use "val1 if cond else val2" instead of "cond and val1 or val2"
Bug #1188111 reported by
Kun Huang
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Kun Huang |
Bug Description
"cond and val1 or val2"
This is an old conditional expression and it's hard to understand because only when val1 is False it will return val2.
Using "val1 if cond else val2" is much understandable.
More talks here:
[0] http://
[1] http://
Changed in swift: | |
milestone: | none → 1.9.0 |
Changed in swift: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/31943
Review: https:/