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.
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.