If One Line

Jacob Kruger jacob at blindza.co.za
Thu Dec 25 12:18:46 EST 2014


Actually more that in the interpreter, it's prompting me with ... as if I had left out a closing ) or something, but, suppose it could work fine in an actual imported bit of code?

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

  ----- Original Message ----- 
  From: Skip Montanaro 
  To: Jacob Kruger 
  Cc: Python 
  Sent: Thursday, December 25, 2014 6:26 PM
  Subject: Re: If One Line


  I don't get an error.


  >>> I = 1 if True else 2
  >>> if I == 1: print("one")
  ... 
  one
  >>> 


  What error did you get?


  Skip



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141225/7d518af7/attachment.html>


More information about the Python-list mailing list