Python complaints

Dennis Lee Bieber wlfraed at ix.netcom.com
Wed Nov 24 11:26:01 EST 1999


On Wed, 24 Nov 1999 10:23:27 +0100, "Fredrik Lundh"
<fredrik at pythonware.com> declaimed the following in comp.lang.python:

> Brad Knotwell <knotwell at ix.netcom.com> wrote:
> > Similarly, the only thing I've found missing from Python is C's
> > ternary operator, it would be nice to be able to do something like 
> > the following:
> > 
> > def max(x,y): return ((x>y) ? x : y)
> 
> now that was one lousy example ;-)
>
	Also potentially unsafe if either x or y is some expression when
invoked. At least, I seem to recall some suggestion to always put macro
arguments in parens...

	def max(x,y): return(((x)>(y)) ? (x) : (y))

--
 > ============================================================== <
 >   wlfraed at ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed at dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




More information about the Python-list mailing list