new enum idiom
Robert Amesz
rcameszREMOVETHIS at dds.removethistoo.nl
Fri Jan 12 21:28:19 EST 2001
Alex Martelli wrote:
> [Does the % operator need a tuple?]
>
>>>> print "foo%dbar" % 23
>foo23bar
>>>>
Ah, I stand corrected. And I really should have checked this myself,
sorry about that. Especially as that would have taken less time than
typing that part of the reply. Silly me.
> [Arguing aesthetics]
>
>Counterpoints would include "it's nicer to have all strings than
>some strings and some tuples", and "other languages allowing such
>explicit specs [C/C++ only, AFAIK] use the name=value syntax, so
>that will be easier to read for people coming from those
>languages".
Those are good points as well. As was the case with mine, these too are
aesthetic arguments, and discussions about personal preferences isn't
going to settle the issue, which is a minor one anyway.
>But I'm just arguing for argument's sake -- it's an obscure corner
>of an obscure idiom, and both usages look pretty much OK to me for
>something likely to see frequencies as low as this.
True. Personally, I'd say this 'obscure corner' has gotten as much
attention as it warrants.
Robert Amesz
More information about the Python-list
mailing list