[Python-bugs-list] [ python-Bugs-668980 ] classmethod does not check its arguments

SourceForge.net noreply@sourceforge.net
Thu, 16 Jan 2003 02:22:58 -0800


Bugs item #668980, was opened at 2003-01-16 11:22
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=668980&group_id=5470

Category: Type/class unification
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Guido van Rossum (gvanrossum)
Summary: classmethod does not check its arguments

Initial Comment:
In 2.3a1, classmethod(3) works just fine. I think it
should be a type error.

It might be worthwhile to specialcase method objects,
so that

class X:
  def foo(self):pass

X.foo=classmethod(X.foo)

does the "right" thing, i.e. is equivalent to

class X:
  def foo(self):pass
  foo=classmethod(foo)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=668980&group_id=5470