a = b = 1 just syntactic sugar?
ed at membled.com
Mon Jun 9 23:11:28 CEST 2003
"Daniel Fackrell" <newsgroups.NOSPAM at dfackrell.mailshell.com> 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'.
>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.
Yes, normally the principle is that dangerous things should have long
and dangerous-looking names. But __setitem__ is not at all dangerous,
it is the analogue of d[k] = v. It ought to have a shorter name.
Ed Avis <ed at membled.com>
More information about the Python-list