News for hackers. Stuff that matters.
Re:Javascript-Style Objects in Python by AnkhMorporkian on Monday March 16, 2015 @02:43PM (#9213393)
Self isn't implicit by design. One of the core python philosophies is that explicit is better than implicit.
Re:Javascript-Style Objects in Python by eatonphil on Monday March 16, 2015 @02:51PM (#9213457)
Then isn't this pattern the epitome of the philosophy?

At some point you trade an api for being explicit. Why isn't memory management explicit in python? I just don't agree with the (seemingly arbitrary) choice of making self explicit. It really does not feel like the "Python" way.

Re:Javascript-Style Objects in Python by AnkhMorporkian on Monday March 16, 2015 @03:13PM (#9213606)
Here's a link from Guido's blog back in '08 why he explains why he rejected a proposal on removing explicit self from the language. I feel he's more qualified to argue this than I.

http://neopythonic.blogspot.com/2008/10/why-explicit-self-ha...