Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: Why this apparent assymetry in set operations?
Sergio Correia
1/15/2008 4:16:00 PM
Both of you are correct.
>>> x = set([1,2,3])
>>> y = set([4,5])
>>> x |= y
>>> x
set([1, 2, 3, 4, 5])
On Jan 15, 2008 11:07 AM, Skip Montanaro <skip@pobox.com> wrote:
> > > Why is that? Doesn't the |= operator essentially map to an update() call?
> >
> > No, according to 3.7 Set Types, s | t maps to s.union(t).
>
> I was asking about the |= assignment operator which according to the
> docs *does* map to the update method.
>
> Skip
>
>
>
>
>
> --
>
http://mail.python.org/mailman/listinfo/p...
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Why this apparent assymetry in set operations?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password