[Python-Dev] PEP 3147
Barry Warsaw
barry at python.org
Sun Apr 11 19:36:19 CEST 2010
More information about the Python-Dev mailing list
Sun Apr 11 19:36:19 CEST 2010
- Previous message: [Python-Dev] PEP 3147
- Next message: [Python-Dev] Status of 2.7b1?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Apr 11, 2010, at 02:39 AM, Nick Coghlan wrote: >Barry Warsaw wrote: >> I don't have strong feelings about this. I thought it would be handy for >> future Python's to have access to this, but then, without access to previous >> version magic numbers, it probably doesn't help much. And as you say, CPython >> won't know about alternative implementation's tags. >> >> So I'm willing to call YAGNI on it and just expose the current Python's magic >> tag. While we're at it, how about making both the tag and the number >> attributes of the imp module, instead of functions like .get_magic()? Of >> course we'd keep the latter for backward compatibility. > >I think one of the virtues of the functions is making it bleedingly >obvious to all concerned that these are read only values. > >So +1 to only exposing the current version of the implementation tag and >magic number, and +0 to doing so via attributes rather than functions. > >(I'm still in favour of keeping the list of old tags and magic numbers >in a source comment though - commenting them out rather than deleting >them when updating them isn't a major hassle). Thinking about this more, I've decided to add imp.get_tag() and remove imp.magic_tags. This avoids changes to the existing API, and just adds to it in a more consistent way. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20100411/680d0fa4/attachment.pgp>
- Previous message: [Python-Dev] PEP 3147
- Next message: [Python-Dev] Status of 2.7b1?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list