bpo-43682: Make staticmethod objects callable (GH-25117)

Static methods (@staticmethod) are now callable as regular functions.
This commit is contained in:
Victor Stinner 2021-04-12 00:21:22 +02:00 committed by GitHub
parent 53114ffef1
commit 553ee2781a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 14 deletions

View file

@ -1142,7 +1142,7 @@ class TestDescriptions(unittest.TestCase):
'''A static method'''
...
self.assertEqual(self._get_summary_lines(X.__dict__['sm']),
'sm(...)\n'
'sm(x, y)\n'
' A static method\n')
self.assertEqual(self._get_summary_lines(X.sm), """\
sm(x, y)