Python complaints

Gordon McMillan gmcm at hypernet.com
Wed Nov 24 08:05:24 EST 1999


Gareth McCaughan says (among other things):

> Mark Carroll wrote:
> 
> > Basically, I'd be really interested to learn: what _don't_
> > people like about Python?
> 
>   - if/then/else works on *statements* (strictly, suites of
>     statements) rather than on *expressions*, so I can't
>     say
>       print "You scored %s point%s" % (score, if score==1 then ""
>       else "s")
>     or anything like that. (Or, as some people prefer to put it,
>     Python has no ? : operator.)

>>> def p(score):
...  print "You scored %d point%s" % (score, score==1 and ' ' 
or 's')
...
>>> p(1)
You scored 1 point
>>> p(3)
You scored 3 points
>>>


- Gordon




More information about the Python-list mailing list