Python 3.5 Entering ABCMeta Does Not Define '__getitem__'

I am testing a Python 3.5 input module, noting a few of my functions.

I have a function that returns a list, although I get a warning in PyCharm.

The warning reads:

The class' ABCMeta 'does not define' __getitem__ ', therefore the operator []' cannot be used in its instances

from typing import List

def get_list() -> List[int]:
    return [1, 2, 3]

Can anyone better interpret this message than I can?

thanks

+4
source share
1 answer

There was a bug in PyCharm. Solved in 5.0.3. REF: https://youtrack.jetbrains.com/issueMobile/PY-17841

+4
source

Source: https://habr.com/ru/post/1618201/


All Articles