mirror of
https://github.com/python/cpython
synced 2024-10-14 17:40:01 +00:00
0dc8b50d33
This speeds up `super()` (by around 85%, for a simple one-level `super().meth()` microbenchmark) by avoiding allocation of a new single-use `super()` object on each use.
8 lines
97 B
Python
8 lines
97 B
Python
class super:
|
|
msg = "truly super"
|
|
|
|
|
|
class C:
|
|
def method(self):
|
|
return super().msg
|