New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't combine a generic decorator with @classmethod #401

Open
pyjsorg opened this Issue Apr 27, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@pyjsorg
Contributor

pyjsorg commented Apr 27, 2012

SVN -r2173

def mdeco_class(f):
def fn(cls, x):
return "7" + f(cls, x) + "8"
return fn

class DecoratedMethods(object):
@mdeco_class
@classmethod
def mtd_class(cls, x):
return x

calling mtd_class raises "fn() takes exactly 2 arguments (1 given)"

Original issue: http://code.google.com/p/pyjamas/issues/detail?id=318 (November 03, 2009 09:12:19)

@pyjsorg

This comment has been minimized.

Show comment
Hide comment
@pyjsorg

pyjsorg Apr 27, 2012

Contributor

From i...@dasir.cz on November 03, 2009 12:13:50:
errata:

class DecoratedMethods(object):
@classmethod
@mdeco_class
def mtd_class(cls, x):
return x

Contributor

pyjsorg commented Apr 27, 2012

From i...@dasir.cz on November 03, 2009 12:13:50:
errata:

class DecoratedMethods(object):
@classmethod
@mdeco_class
def mtd_class(cls, x):
return x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment