3 ms·
Python has little magic in it. It's 3rd party libraries that do un-Pythonic things.
by kevin_thibedeau 6y ago
Python has little magic in it. It's 3rd party libraries that do un-Pythonic things.
- kissgyorgy 6y ago> Python has little magic in it. LOL
- quietbritishjim 6y agoThe descriptor protocol is definitely magic! It normally doesn't matter that it's magic because most people don't need to interact with it. And it causes a very intuitive result in the part of the language that most people actually do interact with: that x = obj.foo; x() is the same as obj.foo() (not true in Javascript!). But that doesn't change the fact that method binding happens in a more complex way under the hood than you'd expect.