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). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com