SilentGhost added the comment:

At the time the len function in list comprehension is called .append has not 
executed, the len call in list comprehension operates on object as it is, 
whereas the object itself is only referenced rather than copied. If you were to 
copy the yielded list, then a more expected behaviour of returning [([], 0)] 
would be demonstrated.

----------
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to