anything new on the ternary operator?

T

Tor

What's the current status on the ternary operator that may or may not be
added to python. Haven't heard much about that since the vote was announced
for a couple of months ago. What's the best way to follow that dicussion?
Or are we just waiting for the developers to make their decision?
 
T

Tor

(if C: x else: z)

Was this the winning syntax? I think I saw it somewhere without the
parentheses, in something written by GvR. This syntax would have been great
without the parentheses. A bit messy with them, especially when they really
don't add any readability, like this
return if C1: x elif C2: y else: z

Why are the parentheses neccessary (and are they really)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top