Skip to content

Commit f8e84be

Browse files
committed
ensure correct caching for no-args methods not having METH_NOARGS
1 parent 1f90bce commit f8e84be

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/sage/misc/cachefunc.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,8 +2848,6 @@ cdef class CachedMethod():
28482848
try:
28492849
if METH_NOARGS&PyCFunction_GetFlags(f.__get__(inst,cls)):
28502850
self.nargs = 1
2851-
else:
2852-
self.nargs = 2
28532851
except Exception:
28542852
pass
28552853
if self.nargs == 0:

0 commit comments

Comments
 (0)