mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Fixes #14: Clarified if-as-expression wording in python tut
This commit is contained in:
parent
879d31e2c6
commit
e1424579e7
@ -101,7 +101,7 @@ try:
|
||||
except NameError:
|
||||
print "Raises a name error"
|
||||
|
||||
# Conditional Expressions can be used when assigning
|
||||
# if can be used as an expression
|
||||
some_var = a if a > b else b
|
||||
# If a is greater than b, then a is assigned to some_var.
|
||||
# Otherwise b is assigned to some_var.
|
||||
|
Loading…
Reference in New Issue
Block a user