>> 1. Have structseq subclass from PyTupleObject so that isinstance(s, tuple) returns True. This makes the object usable whenever >> tuples are needed. > > Hmm, is that really necessary? structseq has been in use for quite a > while and this need hasn't come up -- it's been designed to be quite > compatible with tuple *except* for isinstance checks, and that has > worked well. It looks like that is the only difference, so subclassing from tuple won't cause any other behavioral changes. It looks like making it a subtype involves only changing a few lines. I think it can only help, especially if we start to use structseq for more things in the future. Also, I would like the API to match collections.namedtuple() as closely as possible so that there is just a single useful concept that gets applied whereever needed. The idea is basically that they *are* tuples with the added nicity of attribute access and a self-documenting repr. 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