On 08/03/2014 14:29, eryksun wrote:

Anyway, you needn't go out of your way to rewrite the expression using
a chained comparison. The disjunctive expression is actually
implemented more efficiently by CPython's compiler, which you can
verify using the dis module to disassemble the bytecode.

I have no interest in the efficiency, only what is easiest for me to read, which in this case is the chained comparison. As a rule of thumb I'd also prefer it to be logically correct :)

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to