mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
SF 548651: Fix the METH_CLASS implementation.
Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
This commit is contained in:
parent
c7e3c5e306
commit
bca1cbc6f8
5 changed files with 80 additions and 8 deletions
|
@ -1464,12 +1464,12 @@ def classmethods_in_c():
|
|||
a = (1, 2, 3)
|
||||
d = {'abc': 123}
|
||||
x, a1, d1 = spam.spamlist.classmeth(*a, **d)
|
||||
veris(x, None)
|
||||
vereq((spam.spamlist,) + a, a1)
|
||||
veris(x, spam.spamlist)
|
||||
vereq(a, a1)
|
||||
vereq(d, d1)
|
||||
x, a1, d1 = spam.spamlist().classmeth(*a, **d)
|
||||
veris(x, None)
|
||||
vereq((spam.spamlist,) + a, a1)
|
||||
veris(x, spam.spamlist)
|
||||
vereq(a, a1)
|
||||
vereq(d, d1)
|
||||
|
||||
def staticmethods():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue