New submission from Mehrzad <mehrzad.sar...@aut.ac.ir>:
The inspection `inspect.getfullargspec(object.__init__)` shows that `object.__init__` takes both varargs (starred) and varkw (double-starred) arguments.* However, it is impossible to call `object.__init__` with varargs or varkw arguments. If one tries to call `object.__init__(SomeClass(), ...)` with either of those arguments, the following error is raised: `TypeError: SomeClass.__init__() takes exactly one argument (the instance to initialize)`. This error is not raised if `SomeClass()` is replaced with some literal, e.g. a number. * I can not certify whether it is intended behavior or a bug, because the signature of `obj.__init__` takes those arguments. ---------- components: Distutils, Interpreter Core, Parser files: object_init.py messages: 400144 nosy: Mehrzad, dstufft, eric.araujo, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Inconsistent returned value of inspect.getfullargspec(object.__init__). type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file50229/object_init.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44985> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com