Author ncoghlan
Recipients Jelle Zijlstra, eric.smith, inada.naoki, ncoghlan, pitrou, rhettinger, serhiy.storchaka, vstinner, xiang.zhang
Date 2017-07-17.12:42:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500295368.34.0.740886038778.issue28638@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, I'm saying you need a really long justification to explain why you want to break backwards compatibility solely for a speed increase.

For namedtuple instances, the leading underscore does *NOT* indicate a private attribute - it's just there to avoid colliding with field names.

Speed isn't everything, and it certainly isn't adequate justification for breaking public APIs that have been around for years.

Now, you can either escalate that argument to python-dev, and try to convince Guido to overrule Raymond on this point, *or* you can look at working out a Python level API to dynamically define PyStructSequence subclasses. That won't be entirely straightforward (as my recollection is that structseq is designed to build on static C structs), but if you're successful, it will give you something that should be faster than namedtuple in every way, not just at definition time.
History
Date User Action Args
2017-07-17 12:42:48ncoghlansetrecipients: + ncoghlan, rhettinger, pitrou, vstinner, eric.smith, inada.naoki, serhiy.storchaka, xiang.zhang, Jelle Zijlstra
2017-07-17 12:42:48ncoghlansetmessageid: <1500295368.34.0.740886038778.issue28638@psf.upfronthosting.co.za>
2017-07-17 12:42:48ncoghlanlinkissue28638 messages
2017-07-17 12:42:48ncoghlancreate