Consider this:

def blackhole(*args, **kwds): pass

The fact that it accept args that it ignores could be considered misleading or even a bug. Now modify it to do something useful, like return a new, naked, immutable object that is the same for every call except for identity, and which still totally ignores the args as irrelavant. Call it object.__new__. It is just as misleading, if not more so.

In 3.x, the mistake has been fixed.
>>> object(1)
Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    object(1)
TypeError: object.__new__() takes no parameters

Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to