[Python-Dev] Impact of Namedtuple on startup time
Steve Holden
steve at holdenweb.com
Mon Jul 17 11:34:50 EDT 2017
More information about the Python-Dev mailing list
Mon Jul 17 11:34:50 EDT 2017
- Previous message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Next message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Makes sense. Thanks. S Steve Holden On Mon, Jul 17, 2017 at 4:29 PM, Raymond Hettinger < raymond.hettinger at gmail.com> wrote: > > > On Jul 17, 2017, at 8:22 AM, Steve Holden <steve at holdenweb.com> wrote: > > > > My only question is "what's a variable called _source doing in the > public API?" > > The convention for named tuple hnas been for all the methods and > attributes to be prefixed with an underscore so that the names won't > conflict with field names in the named tuple itself. For example, we want > to allow Path=namedtuple('Path', ['source', 'destination']). > > If I had it all to do over again, it might have been better to have had a > different convention like source_ with a trailing underscore, but that ship > sailed long ago :-) > > > Raymond -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170717/f14b7d99/attachment.html>
- Previous message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Next message (by thread): [Python-Dev] Impact of Namedtuple on startup time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list