From a recent checkin --
level = 0 if "absolute_import" in self.futures else -1
Mentally, I can't help parsing that as "level = 0" plus comments that turn out to be code that triggers backracking.
When the expressions (particularly the true case) are longer, it gets even worse.
I think that adding parentheses would help, by at least signalling that the logic is longer than just the next (single) _expression_.
level = (0 if "absolute_import" in self.futures else -1)
-jJ
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com