Author levinvm
Recipients levinvm
Date 2016-10-28.18:07:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2016-10-28 18:07:05levinvmsetrecipients: + levinvm
2016-10-28 18:07:05levinvmsetmessageid: <>
2016-10-28 18:07:05levinvmlinkissue28550 messages
2016-10-28 18:07:05levinvmcreate