Raymond Hettinger <[email protected]> added the comment:
Stylistically, it would be nice to eliminate the local variable reassignment
entirely:
self.Emin = DefaultContext.Emin if Emin is None else Emin
self.Emax = DefaultContext.Emax if Emax is None else Emax
self._ignored_flags = [] if _ignored_flags is None else _ignored_flags
Also, to keep the code consistent between versions, it may be better to avoid
set/dict comprehensions and stick with the old:
dict([(s, int(s in flags)) for s in _signals])
or slightly more modern generator comprehension:
dict((s, int(s in flags)) for s in _signals)
----------
nosy: +rhettinger
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9136>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com