This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author anuppari
Recipients anuppari, lys.nikolaou, pablogsal
Date 2021-08-27.01:29:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Since the container ABCs are normal classes, and Protocol cannot subclass normal classes, there's no way to create a protocol that extends the ABCs without explicitly listing out all the methods needed for the collection. e.g., can't do this:

from typing import Iterable, Protocol

class IterableWithMethod(Iterable, Protocol):
    def method(self) -> None: pass

Since the ABCs don't provide any default implementations (I think?), maybe they should just be defined as runtime checkable protocols instead of ABCs?
Date User Action Args
2021-08-27 01:29:49anupparisetrecipients: + anuppari, lys.nikolaou, pablogsal
2021-08-27 01:29:49anupparisetmessageid: <>
2021-08-27 01:29:49anupparilinkissue45024 messages
2021-08-27 01:29:49anupparicreate