Skip to content

Commit cbac684

Browse files
committed
Update pep.
1 parent dc308a9 commit cbac684

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pep.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,13 @@ Basic operators
513513
* ``GetAttr[T, S: Literal[str]]``: Extract the type of the member
514514
named ``S`` from the class ``T``.
515515

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+
516523
* ``Length[T: tuple]`` - get the length of a tuple as an int literal
517524
(or ``Literal[None]`` if it is unbounded)
518525

0 commit comments

Comments
 (0)