Message310888
This behaviour is because "parent" descriptor ends calling:
@classmethod
def _from_parsed_parts(cls, drv, root, parts, init=True):
self = object.__new__(cls)
self._drv = drv
self._root = root
self._parts = parts
if init:
self._init()
return self
and this calls object.__new__ and this call raises AttributeError: new_attr. Notice that object.__new__(cls) will not raise as this snippet shows:
>>>: class A:
...: def __new__(*args):
...: raise ZeroDivisionError()
...:
>>> A()
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<python> in <module>()
----> 1 A()
<python> in __new__(*args)
1 class A:
2 def __new__(*args):
----> 3 raise ZeroDivisionError()
4
ZeroDivisionError:
>>> object.__new__(A)
>>> <__main__.A at 0x7f6239c17860> |
|
| Date |
User |
Action |
Args |
| 2018-01-27 21:34:12 | pablogsal | set | recipients:
+ pablogsal, pitrou, qb-cea |
| 2018-01-27 21:34:12 | pablogsal | set | messageid: <[email protected]> |
| 2018-01-27 21:34:12 | pablogsal | link | issue32665 messages |
| 2018-01-27 21:34:12 | pablogsal | create | |
|