Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
slurgfest
on Sept 25, 2012
|
parent
|
context
|
favorite
| on:
Go Bloviations
For information of readers, Python does have a ternary operator. I don't know or care whether it is considered Pythonic, since it is basic Python syntax and seems quite readable to me, e.g.
x = (2 if y > 3 else 4)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
x = (2 if y > 3 else 4)