Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit e0951ba

Browse files
committed
Fix compatibility with latest Python
1 parent c3b91a5 commit e0951ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pdpy11/compiler/deferred.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ def call(f, context):
114114
f.repr_disabled = True
115115

116116
try:
117-
spec = inspect.getargspec(f)
117+
spec = inspect.getfullargspec(f)
118118
except TypeError:
119-
spec = inspect.getargspec(f.__call__)
119+
spec = inspect.getfullargspec(f.__call__)
120120
finally:
121121
if isinstance(f, (Deferred, Lambda)):
122122
f.repr_disabled = False
123123

124124
args = len(spec.args)
125125
varargs = spec.varargs is not None
126-
kwargs = spec.keywords is not None
126+
kwargs = spec.varkw is not None
127127

128128
# Method
129129
if isinstance(f, types.MethodType):

0 commit comments

Comments
 (0)