[New-bugs-announce] [issue28550] if inline statement does not work with multiple assignment.
Levi Velázquez
report at bugs.python.org
Fri Oct 28 14:07:05 EDT 2016
New submission from Levi Velázquez:
Normal "if" inline assignment
obj = None
a = obj.a if obj else None
It assign None to a as expected.
obj = None
a, b = obj.a, obj.b if obj else [None, None]
It raises an error " 'NoneType' object has no attribute 'a'"
when it should assign None to both a and b.
----------
components: Interpreter Core
messages: 279622
nosy: levinvm
priority: normal
severity: normal
status: open
title: if inline statement does not work with multiple assignment.
type: crash
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28550>
_______________________________________
More information about the New-bugs-announce
mailing list