Skip to content

Commit

Permalink
Allow unary + in Literal integers
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoisset authored Dec 25, 2023
1 parent ec4903b commit fa2dd35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/spec/literal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ The following parameters are intentionally disallowed by design:
``Literal[4j]`` that contain just a single complex number are also
prohibited.

- The only exception to this rule is the unary ``-`` (minus) for ints: types
like ``Literal[-5]`` are *accepted*.
- The only exceptions to this rule are the unary ``-`` (minus) and unary ``+`` (plus) for ints: types
like ``Literal[-5]`` and ``Literal[+1]`` are *accepted*.

- Tuples containing valid literal types like ``Literal[(1, "foo", "bar")]``.
The user could always express this type as
Expand Down

0 comments on commit fa2dd35

Please sign in to comment.