mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00

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.
7 lines
97 B
Python
7 lines
97 B
Python
class super:
|
|
msg = "truly super"
|
|
|
|
|
|
class C:
|
|
def method(self):
|
|
return super().msg
|