Steven D'Aprano <ste...@remove.this.cybersource.com.au> writes: > In addition, using a tuple or a list in this context: > > if e.message.code in (25401,25402,25408): > > is so idiomatic, that using a set in it's place would be distracting.
I think a list in that context is fine, and that's the idiom I see far more often than a tuple. > Rather that efficiently communicating the programmer's intention, it > would raise in my mind the question "that's strange, why are they > using a set there instead of a tuple?". The fact that literal set syntax is a relative newcomer is the primary reason for that, I'd wager. -- \ “If you are unable to leave your room, expose yourself in the | `\ window.” —instructions in case of fire, hotel, Finland | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list