News for hackers. Stuff that matters.
Re:Ask HN: Why Python over Ruby? by earthboundkid on Thursday July 02, 2009 @06:29AM (#684129)
"And why would an integer have a method for converting itself to a string? Or an array?"

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.