News for hackers. Stuff that matters.
Re:Javascript-Style Objects in Python by jpetersonmn on Monday March 16, 2015 @01:12PM (#9212744)
For those that didn't see, the original title of this post was "Why use classes at all in python" and not what it is now. Apparently the author thought a dictionary was as useful and could do anything a class object can.
Re:Javascript-Style Objects in Python by eatonphil on Monday March 16, 2015 @02:20PM (#9213229)
No, I think a closure is as useful and can do anything a "class object" can...

What exactly do you think a class can do that you can't replicate in this pattern? Inheritance? Pass the parent function in. Typeof? Store a type value or get the function name reflectively.