[Python-Dev] Simple Switch statement (original) (raw)
Guido van Rossum guido at python.org
Mon Jun 26 16:29:04 CEST 2006
- Previous message: [Python-Dev] Simple Switch statement
- Next message: [Python-Dev] Simple Switch statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/26/06, Michael Urman <murman at gmail.com> wrote:
I also would like to see a way to use 'is' instead of (or inaddition to) '==' for the comparison, but I don't have any use cases behind this.
I've thought about this a bit, and I think it's a red herring. I've seen some places where 'is' is used to compare constants (e.g. sre_compare.py). But I'm pretty sure that this is a speed hack that can safely be forgotten once (if ever) we have a switch statement.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Simple Switch statement
- Next message: [Python-Dev] Simple Switch statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]