Le 09/06/2014 00:05, Raymond Hettinger a écrit : > > Another issue is that a straight abc wouldn't be sufficient. What we > would really want is to check for is: > 1) the presence of a _fields tuple (an abc can do this) > 2) to check that all of the attribute names specified in _fields are > defined (ABCMeta doesn't do this) > 3) and that the type is a Sequence (ABCMeta can do this). > > An tricked-out ABC extension might be worth it if it provided some > non-trivial mixin capabilities for implementing homegrown named tuples > (not created by the factory function), but I don't think we want to go > there. Instead of an ABC, why not a simple is_namedtuple() function? Regards Antoine.
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