> On Feb 20, 2018, at 2:38 PM, Guido van Rossum <guido at python.org> wrote: > > But then the class would also inherit a bunch of misfeatures from tuple (like being indexable and having a length). It would be nicer if it used __slots__ instead. FWIW, George Sakkis made a tool like this about nine years ago. https://code.activestate.com/recipes/576555-records It would need to be modernized to include default arguments, types annotations and whatnot, but otherwise it has great performance and low API complexity. > (Also, the problem with __slots__ is the same as the problem with inheriting from tuple, and it should just be solved right, somehow.) Perhaps a new variant of __init_subclass__ would work. Raymond
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