Ian Bicking wrote: > try: > from string import Template > except ImportError: > from mypackage.backports.string24 import Template > > Doing this in a more elegent or formalized fashion might be nice.
Have you seen my proposal for "or" in import statements? Would you consider that elegant enough? > Versioning the standard library My thought on versioning is that it should look something like import spam[3:], movies.grail[2:4] # version 3 or later of spam, version 2, 3 or 4 of movies.grail I would like this much better than some kind of require() function. Integrating the version specification with the import would solve some problems, such as the one mentioned earlier where a tentative import fails when it would have succeeded if some later require() had been done first. The form that the version numbers should take is up to debate, but I'd tend to keep it extremely simple, i.e. just integers. The baroque possibilities offered by the setuptools require() seem like overkill to me. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com