mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +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:
|
except NameError:
|
||||||
print "Raises a name error"
|
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
|
some_var = a if a > b else b
|
||||||
# If a is greater than b, then a is assigned to some_var.
|
# If a is greater than b, then a is assigned to some_var.
|
||||||
# Otherwise b is assigned to some_var.
|
# Otherwise b is assigned to some_var.
|
||||||
|
Loading…
Reference in New Issue
Block a user