mirror of
https://github.com/micropython/micropython.git
synced 2025-09-05 17:30:41 +02:00
When subclassing a native type, calling native members in `__init__` before `super().__init__()` has been called could cause a crash. In this situation, `self` in `mp_convert_member_lookup` is the `native_base_init_wrapper_obj`. The check added in this commit ensures that an `AttributeError` is raised before this happens, which is consistent with other failed lookups. Also fix a typo in a related comment. Signed-off-by: Laurens Valk <laurens@pybricks.com>
6 lines
47 B
Plaintext
6 lines
47 B
Plaintext
<function>
|
|
AttributeError
|
|
AttributeError
|
|
0
|
|
123
|