[Python-Dev] Half-baked proposal: * (and **?) in assignments
Martin v. Loewis
martin@v.loewis.de
23 Nov 2002 17:44:19 +0100
"Fredrik Lundh" <fredrik@pythonware.com> writes:
> > Readability counts.
> >
> > Actually, you may just avoid the assignments altogether, and just use
> > the named fields.
>
> with names like "tm_mday", doesn't your second statement
> contradict the first one?
It depends on the reader. A reader familiar with the time module will
recognize tm_foo as a field of struct tm, and then figure out what
field it is. That the field is called mday and not just day is
surprising; if the reader is surprised enough, he will look up the
documentation, and the rationale will become clear immediately.
Regards,
Martin