ppperry <maprea...@olum.org> added the comment:

The problem doesn't just happen with `sys.flags`, though. It happens with all 
types that can't be created directly by python. Ex: frame objects, generators, 
cells, etc. The bug is that in types whose c-level tp_new is null, the 
python-level __new__ is inherited from the superclass (and since object defines 
a `__new__`, such a function always exists), instead of being defined to always 
raise an error, like calling the type directly does.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34284>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to