On Tue, Apr 25, 2017 at 09:55:01PM +0200, Dominik George wrote:
> Hi,
>
> > Python should raise a RuntimeError exception with a list as with a set.
>
> It *does*, for a list.
>
> But in Python 3, with [], you do not get a list, but an iterator with a
> list-like API ;). It wraps a list which yo
Hi,
> Python should raise a RuntimeError exception with a list as with a set.
It *does*, for a list.
But in Python 3, with [], you do not get a list, but an iterator with a
list-like API ;). It wraps a list which you add to, but __next__ will yield the
next item if there is one.
-nik
Package: python3
Version: 3.5.3-1
Severity: wishlist
Tags: upstream
Dear Maintainer,
In this thread (in French), I saw that the for loop behaves differently with
sets, lists or frozensets.
http://www.les-mathematiques.net/phorum/read.php?15,1446990,1446990#msg-1446990
With a set:
>>> ens={1, 2}
3 matches
Mail list logo