summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2022-02-20 13:45:13 (GMT)
committerGitHub <noreply@github.com>2022-02-20 13:45:13 (GMT)
commitfa621a738875dc8a644a6149e7ffd4be0a40f1d9 (patch)
treed9124d21c62718fe902338fd9151db469678df8d /Lib
parentdde048819f3975bdf98b3e50ea9ef8ea25ecdb8e (diff)
downloadcpython-fa621a738875dc8a644a6149e7ffd4be0a40f1d9.zip
cpython-fa621a738875dc8a644a6149e7ffd4be0a40f1d9.tar.gz
cpython-fa621a738875dc8a644a6149e7ffd4be0a40f1d9.tar.bz2
[3.10] replace `self` param with more appropriate `cls` in classmethods (GH-31402) (GH-31446)
(cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) Co-authored-by: Josh Smith <cmyuiosu@gmail.com> Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_collections_abc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 97913c7..40417dc 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -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):