Author serhiy.storchaka
Recipients martin.panter, rhettinger, serhiy.storchaka
Date 2015-12-08.09:08:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I agree that it would be nice to have. But this feature has a cost.

$ ./python -m timeit -s 'from urllib.parse import ParseResult' -- "ParseResult('http', '', '/doc/', '', 'query=yes', 'frag')"
Unpatched: 1.61 usec per loop
Patched:   2.1 usec per loop

$ ./python -m timeit -s 'from urllib.parse import urlparse' -- 'urlparse("")'

Unpatched: 8.87 usec per loop
Patched:   9.22 usec per loop

Is this cost significant?

The cost can be decreased by using global _tuple_new = tuple.__new__. But this couples the code too tight to implementation details of namedtuple.
Date User Action Args
2015-12-08 09:08:06serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, martin.panter
2015-12-08 09:08:05serhiy.storchakasetmessageid: <>
2015-12-08 09:08:05serhiy.storchakalinkissue23416 messages
2015-12-08 09:08:05serhiy.storchakacreate