Skip to content

Commit 3db3913

Browse files
committed
docs: Document __set_name__ implementation.
Marking this portion of PEP487 as implemented, and adding the method to the comments on the feature flag that controls its presence. Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
1 parent ecad02e commit 3db3913

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] Only :func:`__set_name__` is implemented.

py/mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ typedef time_t mp_timestamp_t;
11241124
#define MICROPY_PY_FUNCTION_ATTRS_CODE (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_FULL_FEATURES)
11251125
#endif
11261126

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy