3 ms·
Python 2 has old-style classes, new-style classes, functions, bound methods, unbound methods, slot wrappers, descriptors, method wrappers, built-ins, ... and I'
by dom0 9y ago
Python 2 has old-style classes, new-style classes, functions, bound methods, unbound methods, slot wrappers, descriptors, method wrappers, built-ins, ... and I'm rather certain I forgot some. All kinda callable types I mentioned behave differently. This makes the language complicated; and due to the dynamic nature leads to subtle bugs that are only detectable at runtime. Python 2 is a lot like C there. This isn't limited to callables but is spread around the language in a lot of places. Python (both 2 and 3) is not a simple language. It has a supremely complicated data model whose documentation is insufficient and scattered.