[Python-ideas] Add MutableSet.update?

Lucas Wiman lucas.wiman at gmail.com
Sat Mar 10 17:13:10 EST 2018


On Fri, Mar 9, 2018 at 6:24 PM, MRAB <python at mrabarnett.plus.com> wrote:

> On 2018-03-10 01:15, Guido van Rossum wrote:
>
>> Yes, you can use the |= operator instead.
>>
>> |= is not quite the same as .update because it rebinds, so if the name on
> the LHS isn't local it'll raise NameError.
>
> Does that matter?


Not for my use case; that should work great. Thanks Guido!

- Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180310/2873e835/attachment.html>


More information about the Python-ideas mailing list