[issue31127] Abstract classes derived from built-in classes don't block instance creation

2017-08-06 Thread R. David Murray
R. David Murray added the comment: This is a duplidate of issue 5996. It is not clear if we are going to treat it as a bug or a doc bug. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> abstract class instantiable when

[issue31127] Abstract classes derived from built-in classes don't block instance creation

2017-08-06 Thread Kevin Shweh
New submission from Kevin Shweh: The only check that prevents instantiating abstract classes is in object.__new__, but most built-in classes never actually call object.__new__. That means you can do stuff like import abc class Foo(list, metaclass=abc.ABCMeta): @abc.abstractmethod