Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: Why Python over Ruby?. Parent comment
You know that under the covers in Python str(1) works by calling (1).__str__(), right? That's why you can make str(my_custom_class) work.
There are no comments on this comment yet.
You know that under the covers in Python str(1) works by calling (1).__str__(), right? That's why you can make str(my_custom_class) work.