[Python-ideas] PEP 506: some thoughts on the output length of token_bytes (and why I think it should be split in half)

2018-03-10 Thread Tom Tervoort
Hi all, PEP 506, which introduces the secrets module, states the following: Default arguments One difficult question is "How many bytes should my token be?". We can help with this question by providing a default amount of entropy for the "token_*" functions. If the nbytes argument is

Re: [Python-ideas] Add MutableSet.update?

2018-03-10 Thread Lucas Wiman
On Fri, Mar 9, 2018 at 6:24 PM, MRAB 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

Re: [Python-ideas] Add MutableSet.update?

2018-03-10 Thread Chris Barker
On Sat, Mar 10, 2018 at 3:24 AM, MRAB 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, isn't that an "in-place operator" i.e. if it's a mutable object it should mutate rather than r

Re: [Python-ideas] Add MutableSet.update?

2018-03-10 Thread Nathaniel Smith
On Sat, Mar 10, 2018 at 2:45 PM, Chris Barker wrote: > On Sat, Mar 10, 2018 at 3:24 AM, MRAB 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, > > > isn't that an "in-place ope