We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc308a9 commit cbac684Copy full SHA for cbac684
pep.rst
@@ -513,6 +513,13 @@ Basic operators
513
* ``GetAttr[T, S: Literal[str]]``: Extract the type of the member
514
named ``S`` from the class ``T``.
515
516
+
517
+* ``GetSpecialAttr[T: type, Attr: Literal[str]]``: Extract the value
518
+ of special attribute named ``Attr`` from the class ``T``. Valid
519
+ attributes are ``__name__``, ``__module__``, and ``__qualname__``.
520
+ Returns the value as a ``Literal[str]``.
521
522
523
* ``Length[T: tuple]`` - get the length of a tuple as an int literal
524
(or ``Literal[None]`` if it is unbounded)
525
0 commit comments