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

Gregory P. Smith greg at krypto.org
Sun Feb 3 08:47:50 CET 2008


yep we've already been through that problem in the past when list
comprehensions, generators and with were added to name a few.  since python
3 code is highly unlikely to even parse with a 2.x interpreter much of the
time thats a reason to consider a .py3 extension if this precedent of not
caring is to be broken.

-0 on using .py3 instead of .py for python 3.  i think its slightly silly
but i won't object.

+1 on devising a way (to appear starting in 2.6 and 3.0) of marking the
minimum language version required by a file near the top so that the parser
can bail with a useful error message instead of one confusing to the lay
person.  similar to a from future import type of thing perhaps?  or should
python parse a #! line and magically notice a required major version number
in the python binary name (evil but it would work and magically annotate a
bunch of existing code as 2 vs 3)?

also yes python 3 should build and install as 'python3' as the short form of
its name though realistically anyone sane will write their code with #!
lines specifying the actual version in the executable name and have shell
aliases setup if they want an even shorter name.

On 2/2/08, skip at pobox.com <skip at pobox.com> wrote:
>
>
>     Leif> There is already an idiom with other packages (pygtk etc.) that
>     Leif> suggests syntax like
>
>     Leif> try:
>     Leif>     python.require('3.1')
>     Leif> except:
>     Leif>     print('Some warning about version incompatibility')
>     Leif>     exit(1)
>
> It won't work in this case.  Compilation of the module might well fail
> because of Python2/Python3 syntax differences.
>
> Skip
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe:
> http://mail.python.org/mailman/options/python-3000/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080202/4bbec1cf/attachment.htm 


More information about the Python-3000 mailing list