We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1034b17 commit f58eb80Copy full SHA for f58eb80
tests/cpydiff/core_class_setname.py
@@ -0,0 +1,15 @@
1
+"""
2
+categories: Core,Classes
3
+description: ``__set_name__`` is not automatically called on applicable class members.
4
+cause: MicroPython does not currently implement PEP 487.
5
+workaround: Manually iterate through a class's ``__dict__`` and invoke ``__set_name__`` on its members after creating a class.
6
7
+
8
9
+class Descriptor:
10
+ def __set_name__(self, owner, name):
11
+ print(f"Descriptor.__set_name__({owner.__name__}, {name!r})")
12
13
14
+class A:
15
+ x = Descriptor()
0 commit comments