Skip to content

Commit d5dc554

Browse files
AJMansfielddpgeorge
authored andcommitted
docs: Document PEP487 __set_name__ implementation.
Signed-off-by: Anson Mansfield <[email protected]>
1 parent 4412753 commit d5dc554

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/differences/python_36.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Python 3.6 beta 1 was released on 12 Sep 2016, and a summary of the new features
2525
+--------------------------------------------------------+--------------------------------------------------+-----------------+
2626
| `PEP 468 <https://www.python.org/dev/peps/pep-0468/>`_ | Preserving the order of *kwargs* in a function | |
2727
+--------------------------------------------------------+--------------------------------------------------+-----------------+
28-
| `PEP 487 <https://www.python.org/dev/peps/pep-0487/>`_ | Simpler customization of class creation | |
28+
| `PEP 487 <https://www.python.org/dev/peps/pep-0487/>`_ | Simpler customization of class creation | Partial |
29+
| | | [#setname]_ |
2930
+--------------------------------------------------------+--------------------------------------------------+-----------------+
3031
| `PEP 520 <https://www.python.org/dev/peps/pep-0520/>`_ | Preserving Class Attribute Definition Order | |
3132
+--------------------------------------------------------+--------------------------------------------------+-----------------+
@@ -198,3 +199,7 @@ Changes to built-in modules:
198199
+--------------------------------------------------------------------------------------------------------------+----------------+
199200
| The *compress()* and *decompress()* functions now accept keyword arguments | |
200201
+--------------------------------------------------------------------------------------------------------------+----------------+
202+
203+
.. rubric:: Notes
204+
205+
.. [#setname] Currently, only :func:`__set_name__` is implemented.

py/mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ typedef time_t mp_timestamp_t;
11291129
#define MICROPY_PY_FUNCTION_ATTRS_CODE (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_FULL_FEATURES)
11301130
#endif
11311131

1132-
// Whether to support the descriptors __get__, __set__, __delete__
1132+
// Whether to support the descriptors __get__, __set__, __delete__, __set_name__
11331133
// This costs some code size and makes load/store/delete of instance
11341134
// attributes slower for the classes that use this feature
11351135
#ifndef MICROPY_PY_DESCRIPTORS

0 commit comments

Comments
 (0)