Will python never intend to support private, protected and public?

Paul Rubin http
Mon Oct 3 13:47:26 CEST 2005

bokr at oz.net (Bengt Richter) writes:
> Would you want to outlaw 'None' as an attribute name?
> Python seems to be straddling the fence at this point:
>  >>> c.None = 'c.None'
>  SyntaxError: assignment to None

Heehee, I think that's just a compiler artifact, the lexer is treating
None as a keyword instead of a normal lexical symbol that the compiler
treats separately.  That's also why it raises SyntaxError instead of
some other type of error.  Yes, None should be ok as an attribute name.

> I could see it as part of a debugging interface that might let you
> mess more with frames in general. I wouldn't be surprised if a lot
> of the under-the-hood access we enjoy as it is was a byproduct of
> scratching debugging-tool-need itches.

Such an interface should probably work like the Java one, i.e. it would
have a special socket listener that you'd poke at the program through,
not have debugging code running in the same interpreter space as the
target app.

More information about the Python-list mailing list