a = b = 1 just syntactic sugar?

Daniel Fackrell newsgroups.NOSPAM at dfackrell.mailshell.com
Mon Jun 9 13:58:50 EDT 2003


Ed Avis wrote:
> mis6 at pitt.edu (Michele Simionato) writes:
>
>> Am I mistaken or you want dict.__setitem__ ?
>
> Yes, but ideally without the four underscores which seem to convey
> 'internal stuff, you're not really meant to call this'.  Perhaps I am
> just too squeamish and good Python programmers have no objection to
> writing code full of __x__().  I know I've seen some code by Guido
> which looks like that.

This may help:

http://www.python.org/doc/current/ref/id-classes.html

So not really internal stuff, just treated a bit differently.  The
_something and __something forms could, however, be seen as discouraging use
without giving more serious thought.

--
Daniel Fackrell (newsgroups.NOSPAM at dfackrell.mailshell.com)
When we attempt the impossible, we can experience true growth.






More information about the Python-list mailing list