Graham Dumpleton
Graham Dumpleton
Using: ``` self.__call__ = __call__ ``` would not have desired effect since that would set `__call__` on the wrapped object and not the wrapper because of how `__setattr__` is defined....
Oh, and regard question "why didn't you implement `__aenter__` and `__aexit__`", because they never existed when `wrapt` was first written.
I have already implemented a variant of dynamically adding a new class in `__new__` as discussed to add `__call__`, `__iter__`, `__next__`, `__aiter__` and `__anext__`. I also already added `__aenter__`, `__aexit__`...
In respect of `__get__` you would normally have: * `obj.attr` → Python calls `attr.__get__(obj, type(obj))` If you have basic proxying of `__get__` then result is: * `proxy.attr` → Python calls...
That will teach me to bash out a response when running out the door and still groggy from a late night and lack of sleep. 🤣 So yes, I messed...
The nature of the changes discussed had already all been made, albeit differently to simplify things and ensure it could all be cleanly integrated with the C extension implementation. My...
For the `__init_subclass__` dunder method is a class method (not instance method) involved in class inheritance. It comes into play if you are inheriting from a class type and in...
Have had to pull back on `ObjectProxy` being replaced with `AutoObjectProxy`. The memory overhead per instance with a new class type being created every time was way too much. Thus...
Given that `AutoObjectProxy` is now opt in, I had already done that and also added `__set_name__` as well.
You can't technically do: ``` return type(self)(self.__wrapped__ + other) ``` since a custom derived `ObjectProxy` type might be used which has a custom `__init__()` which accepts multiple arguments, or a...