On Mon, 10 Jun 2019 at 22:37, Ethan Furman <et...@stoneleaf.us> wrote:

> Greetings!
>
> I saw my first annotation mix-up with regards to Enum today:
>
>    https://stackoverflow.com/q/56532591/208880
>
>      #enum import:
>      from enum import Enum
>
>      # enum definition:
>      class Status(Enum):
>          on: 1
>          off: 2
>
> My question for the group:
>
> Is this worth "fixing" or should I leave it alone?  On the one hand it
> seems like an obvious error, but on the other I hate getting in the way of
> needs I haven't thought of.
>

>From the point of view of static type checkers this is an error as well
(e.g. mypy gives an error at the definition site because 1 and 2 are not
valid types).
I don't have any opinion about whether this should be a runtime error as
well.

--
Ivan
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/67F4LWTCYBMWJKESYXB6V65S7ZECWADM/

Reply via email to