Using __slots__ with a classic class is an error that does not readily reveal itself. For Py2.3.1, I would like to issue a warning, and for Py2.4, I would like to raise an exception upon class creation: >>> class A: ... __slots__ = 'abc' # Would otherwise pass silently ... pass ... Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: PyClass_New: __slots__ only works with new-style classes Do you guys agree? Raymond Hettinger
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4