Vadim Pushtaev <pushtaev...@gmail.com> added the comment:
> See also issue31506 Okay, I admit, reporting `tuple.__new__` instead of `sys.flags` is misleading. But what about this? > `tuple.__new__(NamedTuple)` works, and produces a namedtuple object, so > tuple.__new__ is what the error should point to. Isn't it the same? Why should we say anything about `tuple` if a user wants A? This looks similar to 31506: >>> from collections import namedtuple >>> class A(namedtuple('x', 'x')): ... pass ... >>> A.__new__(1, 2) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1, in __new__ TypeError: tuple.__new__(X): X is not a type object (int) ---------- _______________________________________ 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