[Python-Dev] Adding C ternary select (a?b:c) to Python?

Eric S. Raymond esr@thyrsus.com
Sun, 30 Jan 2000 10:59:42 -0500

Jim Fulton <jim@digicool.com>:
> I'm surprised that using the colon doesn't cause problems.

Pgen doesn't tag this ambiguous.  The LL(1) traversal actually helps
here; by the time you see a colon, you already know whether or not you're
parsing a ternary telect.
		<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>

Don't think of it as `gun control', think of it as `victim
disarmament'. If we make enough laws, we can all be criminals.