mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.10] replace self
param with more appropriate cls
in classmethods (GH-31402) (GH-31446)
(cherry picked from commit a3fcca4af1
)
Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
This commit is contained in:
parent
dde048819f
commit
fa621a7388
1 changed files with 2 additions and 2 deletions
|
@ -871,7 +871,7 @@ class KeysView(MappingView, Set):
|
|||
__slots__ = ()
|
||||
|
||||
@classmethod
|
||||
def _from_iterable(self, it):
|
||||
def _from_iterable(cls, it):
|
||||
return set(it)
|
||||
|
||||
def __contains__(self, key):
|
||||
|
@ -889,7 +889,7 @@ class ItemsView(MappingView, Set):
|
|||
__slots__ = ()
|
||||
|
||||
@classmethod
|
||||
def _from_iterable(self, it):
|
||||
def _from_iterable(cls, it):
|
||||
return set(it)
|
||||
|
||||
def __contains__(self, item):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue