[Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

Leif Walsh adlaiff6 at gmail.com
Sun Feb 3 02:52:14 CET 2008


On Feb 2, 2008 8:38 PM, Ron Adam <rrr at ronadam.com> wrote:
> Instead of a shebang which depends on the shell, maybe a version specifier
> of some sort could be used?
>
>     # -*- pyversions: 2.5, 2.6 -*-
>
> So if a python 3.x detects a too low a version, maybe it can try to restart
> the program with the highest installed version specified.  (Or some
> variation of this.)

There is already an idiom with other packages (pygtk etc.) that
suggests syntax like

try:
    python.require('3.1')
except:
    print('Some warning about version incompatibility')
    exit(1)

This concern seems better addressed within the language itself, rather
than in the shebang (which would make the decision depend on the shell
and the packaging involved).

-- 
Cheers,
Leif


More information about the Python-3000 mailing list