PEP 308: "then" "else" for deprecating "and" "or" side effects
Erik Max Francis
max at alcyone.com
Fri Feb 14 00:58:23 EST 2003
More information about the Python-list mailing list
Fri Feb 14 00:58:23 EST 2003
- Previous message (by thread): PEP 308: "then" "else" for deprecating "and" "or" side effects
- Next message (by thread): PEP 308: "then" "else" for deprecating "and" "or" side effects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christian Tismer wrote: > Due to the presence of a real boolean type, we > should ask ourselves if "and" and "or" shouldn't be > deprecated in their current meaning, towards being > "boolean only"? No, I don't think so. Their use is already too well-entrenched to want to do something like this. > "and" and "or" are behaving like logical operators. > They happen to do this by not providing a plain > truth value, but by promoting one of their operands. They _are_ logical operators. They just do their logical by returning one of the objects, rather than a strict Boolean. Other languages do this, like Lisp; there's nothing inherently wrong with it. It's also way too entrenched to change now. It's an example of a feature that I don't often rely on, but even I, a champion of the Booleans PEP, wouldn't think to change their behavior now. -- Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/ __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE / \ The average dog is a nicer person than the average person. \__/ Andrew A. Rooney Python chess module / http://www.alcyone.com/pyos/chess/ A chess game adjudicator in Python.
- Previous message (by thread): PEP 308: "then" "else" for deprecating "and" "or" side effects
- Next message (by thread): PEP 308: "then" "else" for deprecating "and" "or" side effects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list