← Back to DAGDA | Support | Source: https://github.com/ambv/static-annotations/commit/e33e2039abc19b3c678c604e8fb90de03949819a
Skip to content
This repository was archived by the owner on Jun 22, 2020. It is now read-only.

Commit e33e203

Browse files
author
Lukasz Langa
committed
Reverse stance on verbatim strings
1 parent 5ff2bc8 commit e33e203

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎pep-0563.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ in the respective ``__annotations__`` dictionary. Static type checkers
9191
will see no difference in behavior, whereas tools using annotations at
9292
runtime will have to perform postponed evaluation.
9393

94-
If an annotation was already a string, this string is preserved
95-
verbatim. In other cases, the string form is obtained from the AST
96-
during the compilation step, which means that the string form might not
97-
preserve the exact formatting of the source.
94+
The string form is obtained from the AST during the compilation step,
95+
which means that the string form might not preserve the exact formatting
96+
of the source. Note: if an annotation was a string literal already, it
97+
will still be wrapped in a string.
9898

9999
Annotations need to be syntactically valid Python expressions, also when
100100
passed as literal strings (i.e. ``compile(literal, '', 'eval')``).

0 commit comments

Comments
 (0)