15.12.17 02:25, Yury Selivanov пише:
My motivation to add the slot wasn't the performance: it's just not possible to have a class-level __getitem__ on types defined in C. The only way is to define a base class in C and then extend it in pure-Python. This isn't too hard usually, though.
What are problems? How this differs from __sizeof__ and __getstate__? _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com