Miguel added the comment:
Your proposal also makes an extra computation: an item (not) belongs to a list
if not self._w in cmd:
cmd = _flatten((self._w, cmd))
Also it's more efficient to use this than the function _flaten() in that
situation:
if not self._w in cmd:
cmd = (self._w,) + cmd
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com