Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
TACD
3 days ago
|
parent
|
context
|
favorite
| on:
Advanced Python Features
Similarly with 9.2, assignment using a walrus operator will also fail if the value is 0 (or anything falsy:
https://docs.python.org/3/library/stdtypes.html#truth-value-...
)
maleldil
3 days ago
[–]
You can use `if (response := get_user_input()) is not None` if that's important. IME, empty strings and None would be treated the same way.
reply
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: