[New-bugs-announce] [issue27157] Unhelpful error message when one calls a subclass of type

ppperry report at bugs.python.org
Sun May 29 18:46:08 EDT 2016


New submission from ppperry:

>>>class x(type):pass
>>> x(x)
Traceback (most recent call last):
  File "<pyshell#335>", line 1, in <module>
    x(x)
TypeError: type() takes 1 or 3 arguments

I am giving it one argument, and yet it's complaining that `type` expects one or three arguments. How unhelpful.

----------
components: Interpreter Core
messages: 266643
nosy: ppperry
priority: normal
severity: normal
status: open
title: Unhelpful error message when one calls a subclass of type
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27157>
_______________________________________


More information about the New-bugs-announce mailing list