Re:Ask HN: Why Python over Ruby?
by earthboundkid on Thursday July 02, 2009 @06:19AM
(#684123)
Or it would have to inherit the method from a common iterator class. Which gets to the heart of the Ruby/Python thing: In Python inheritance just isn't as stressed, since people prefer duck-typing to isinstance. On the other hand, since you can reopen classes in Ruby, it's not as crazy to use the modification of a common base class as a means of making a method work with a wide variety of object types.
[ Parent
| on HN ]
There are no comments on this comment yet.