[Python-ideas] Re: Universal set

2020-08-10 Thread David Caro
m the universal" set removed.add(element) assrt element not in removed # False, as it has been already "removed from the universal" set If so, it should be relatively easy (as Joao says in some other reply) to implement a class that behaves that way. -- David Caro _

[Python-ideas] Re: bpo-41231: wraps default behavior with __annotations__

2020-08-08 Thread David Caro
that everyone doing that > re-implements whatever logic you have in that PR for "2" (thus defeating > the very purpose of "@wraps" - I'd rather rebind wrapper.__name__ and > __wrapped__ manually) > > TL;DR: I agree that "2" is the way to go. >

[Python-ideas] bpo-41231: wraps default behavior with __annotations__

2020-08-07 Thread David Caro
a helper when wrapping functions in a simple manner (not changing the signature), then this becomes a bit more inconvenient, as it will not copy the `__annotations__` as it was doing by default. It also changes the current default behavior, so it will potentially affect everyone that uses `wraps` c