Josiah Carlson wrote: > Somewhere in the back of my mind something is telling me - if you can > get a tuple with attributes based on __slots__, you just duplicate the > references as both an attribute AND in the standard tuple PyObject* > array, It should be possible to start with a tuple subclass and add descriptors to provide named access. If the descriptor is implemented in C it should be just as efficient as using __slots__, but with no duplication of the references. Given a suitable descriptor type, it shouldn't be hard to write a factory function to assemble such classes. -- Greg
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