3 ms·
Functions are objects in Python. Thanks to __call__, quite profoundly so. Multiparadigm is a bit oversold; in any language, when paradigms conflict, something
by jerf 15y ago
Functions are objects in Python. Thanks to __call__, quite profoundly so.
Multiparadigm is a bit oversold; in any language, when paradigms conflict, something wins. Either you consistently choose something, in which case you get a coherent language, or you don't, in which case you get an incoherent mismash (which may be usable, but tends to scale poorly in the end). In Python, that something is OO.
OO broadly means the base abstraction of the language syntax and base libraries is classes and objects. That's Python. Everything is an object, even when that's papered over with things that don't wave it in your face.