diff options
author | Jose V. Trigueros <j.v.trigueros@gmail.com> | 2015-07-15 22:45:06 -0600 |
---|---|---|
committer | Jose V. Trigueros <j.v.trigueros@gmail.com> | 2015-07-15 22:45:06 -0600 |
commit | b360bf94960220b8f81db26e54ffacee6ed0c662 (patch) | |
tree | 8cdde709fb0f511627ba769ff150ec650942b285 /ply/yacc.py | |
parent | dbf122652d38ba03ff9f9fe4aa9bee3693e6775f (diff) | |
download | ply-b360bf94960220b8f81db26e54ffacee6ed0c662.tar.gz |
MethodType doesn't have __code__ attribute, use __func__
Diffstat (limited to 'ply/yacc.py')
-rw-r--r-- | ply/yacc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ply/yacc.py b/ply/yacc.py index eb02cc2..c2ec541 100644 --- a/ply/yacc.py +++ b/ply/yacc.py @@ -3161,7 +3161,7 @@ class ParserReflect(object): if n.startswith('p_') and n != 'p_error': self.log.warning('%r not defined as a function', n) if ((isinstance(v, types.FunctionType) and v.__code__.co_argcount == 1) or - (isinstance(v, types.MethodType) and v.__code__.co_argcount == 2)): + (isinstance(v, types.MethodType) and v.__func__.__code__.co_argcount == 2)): if v.__doc__: try: doc = v.__doc__.split(' ') |