Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...hasattr(self, name): raise AttributeError, "attributes are write-once" object.__setattr__(self, name, value) C++ programmers may find it useful to realize that this form of subtyping in Python is implemented very similarly to single-inheritance subclassing in C++, with __class__ in the role of the vtable. There's much more that could be explained (like the __metaclass__ declaration, and the __new__ method), but most of that is pretty esoteric. See belo...
...hasattr(self, name): raise AttributeError, "attributes are write-once" object.__setattr__(self, name, value) C++ programmers may find it useful to realize that this form of subtyping in Python is implemented very similarly to single-inheritance subclassing in C++, with __class__ in the role of the vtable. There's much more that could be explained (like the __metaclass__ declaration, and the __new__ method), but most of that is pretty esoteric. See below if you...
...hasAttribute and hasAttributeNS methods; and Text supports the splitText method. Build issues For Unix (and Unix-compatible) builds, configuration and building of extension modules is now greatly automated. Rather than having to edit the Modules/Setup file to indicate which modules should be built and where their include files and libraries are, a distutils-based setup.py script now takes care of building most extension modules. All extension modules built this way are built as shared libra...
...hasattr() now lets exceptions which do not inherit Exception (KeyboardInterrupt, and SystemExit) propagate instead of ignoring them. #3021 Exception reraising sematics have been significantly improved. However, f_exc_type, f_exc_value, and f_exc_traceback cannot be accessed from Python code anymore. Three of PyNumberMethods' members, nb_coerce, nb_hex, and nb_oct, have been removed. Extension Modules Renamed _winreg module to winreg. Support os.O_ASYNC and fcntl.FASYNC if the constants exis...
...hasattr()). This used to cause wrong output, including spurious claims of recursive functions and attribution of time spent to the wrong function. The code and documentation for the derived OldProfile and HotProfile profiling classes was removed. The code hasn't worked for years (if you tried to use them, they raised exceptions). OldProfile intended to reproduce the behavior of the profiler Python used more than 7 years ago, and isn't interesting anymore. HotProfile intended to provide a fas...
If you didn't find what you need, try your search in the Python language documentation.