Re: Wishlist: to Derek

new topic     » topic index » view thread      » older message » newer message

>By the way, Daryl, "&=" is not the same as append().

True enough.  eg:

s1 = {'a', 'b'}
s1 = append(s1, "c")
--s1 would now be {'a', 'b', {'c'}}

s1 &= "d"
--s1 would now be {'a', 'b', {'c'}, 'd'}

If you were appending an atom, however, you might as well use &=. eg:

s1 &= 'a'

is the same as:

s1 &= "a"

I was aware that & and append() are different, but I suggested it because 
quite often I append an atom onto the end of a sequence, and then you can 
use the shorthand &=.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu