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 andrei.avk
Recipients BTaskaya, andrei.avk, ethan.furman, jbasko, rhettinger, stutzbach, tda
Date 2021-07-09.00:30:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625790611.49.0.391270950285.issue35815@roundup.psfhosted.org>
In-reply-to
Content
Ethan, here  is the code I tried with 3.9, and the failure:

import abc
class Base(abc.ABC):
    def __init_subclass__(cls, **kwargs):
        instance = cls()
        print(f"Created instance of {cls} easily: {instance}")
    @abc.abstractmethod
    def do_something(self):
        pass
class Derived(Base):
    pass
Derived()

Output:
python3 ~/temp/a.py                                                                                                                                                        ----VICMD----
Traceback (most recent call last):
  File "/Users/ak/temp/a.py", line 53, in <module>
    Derived()
TypeError: Can't instantiate abstract class Derived with abstract method do_something
History
Date User Action Args
2021-07-09 00:30:11andrei.avksetrecipients: + andrei.avk, rhettinger, stutzbach, ethan.furman, BTaskaya, jbasko, tda
2021-07-09 00:30:11andrei.avksetmessageid: <1625790611.49.0.391270950285.issue35815@roundup.psfhosted.org>
2021-07-09 00:30:11andrei.avklinkissue35815 messages
2021-07-09 00:30:11andrei.avkcreate