Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
the PHP ternary operator equivalent on Python
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Paul Rubin, post: 1850324"] It gets messy for a more complicated structure: d = {'x': x1() if x_is_old else x2(), 'y': y1() if y_is_old else y2(), 'z': z1() if z_is_old else z2() } etc. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
the PHP ternary operator equivalent on Python
Top