3 ms·
There are some defined in built-in modules. Even in Python 2.7, where sys.version_info is a namedtuple.
by ubernostrum 10y ago
There are some defined in built-in modules. Even in Python 2.7, where sys.version_info is a namedtuple.
- cben 10y agoYeah, one of the motivations for adding namedtuple to stdlib was a drop-in compatible upgrade of existing interfaces returning tuples. Notable atrocities included `time.localtime()` returning a 9-tuple, and `os.stat()` returning a 10-tuple...