[Python-ideas] Enabling / disabling optional type hinting

Stefan Krah skrah at bytereef.org
Sat Mar 23 15:52:29 EDT 2019


On Sat, Mar 23, 2019 at 12:44:29PM -0700, Gregory P. Smith wrote:
> Unfortunately that isn't what PEP 526 said:
> https://www.python.org/dev/peps/pep-0526/#annotating-expressions

Which part though?  I'd understand ...

   (x): int      # Annotates x with int, (x) treated as expression by compiler.


... to mean that the expression is also evaluated if no assignment takes place.


Stefan Krah





More information about the Python-ideas mailing list