[Python-3000] Support for PEP 3131

Jim Jewett jimjjewett at gmail.com
Tue Jun 12 18:48:46 CEST 2007


On 6/11/07, Baptiste Carvello <baptiste13 at altern.org> wrote:
> Michael Urman a écrit :

> > ... you already cannot visually inspect ...
> > There is the risk of visually aliased identifiers, but how is that
> > qualitatively worse than the truly conflicting identifiers you can
> > import with a *, or have inserted by modules mucking with
> > __builtins__?

> Oh come on! imports usually are located at the top of the file, so they won't
> clobber other names. And mucking with __builtins__ is rare and frowned upon.

Also, both are at least obvious.  Because of the (unexpected) visually
similar possibilities, a closer analogy would be a module that did

    def fn1():
        global mydata
        mydata = sys.modules['__builtin__']

and later changes mydata.  This is certainly possible, but it isn't
common, or accepted as good style.

> On the contrary, non-ASCII identifiers will be encouraged,
> anywhere in the code.

And that's OK with me -- but I want a warning when they are used, at
least as conspicuous as

    import *
    __builtins__

I have no objection to letting people turn that warning off locally
(preferably per-charset, rather than as a single switch), but I want
that decision to be local and explicit.

-jJ


More information about the Python-3000 mailing list