Steven D'Aprano <[email protected]> added the comment:
I don't think the description you give is very accurate. The description in the
file splat.py says:
"Hangs/core dumps Python2 when instantiated"
(which is it? hang or core dump?)
but I can't replicate that. Instantiating A() is fine for me. (Tested in Python
2.7 on Linux.)
The whole business about "splat" is amusing but irrelevant. I can replicate the
hang (no core dump) using this simpler example:
class B:
def __getattr__(self, name):
return name in dir(self)
Instantiating the class is fine, but calling dir() on it locks up:
>>> b = B()
>>> dir(b)
[1]+ Stopped python2.7 -E
(after typing Ctrl-Z in the xterm). Notice that B is an old-style class in this
example. The same behaviour also occurs when inheriting from object.
----------
nosy: +steven.daprano
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34346>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com