[Python-checkins] replace `self` param with more appropriate `cls` in classmethods (GH-31402)
asvetlov
webhook-mailer at python.org
Sun Feb 20 07:31:35 EST 2022
https://github.com/python/cpython/commit/a3fcca4af1cb418dc802feb75100ecc1a286afaa
commit: a3fcca4af1cb418dc802feb75100ecc1a286afaa
branch: main
author: Josh Smith <cmyuiosu at gmail.com>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2022-02-20T14:31:09+02:00
summary:
replace `self` param with more appropriate `cls` in classmethods (GH-31402)
files:
M Lib/_collections_abc.py
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 97913c77721da..40417dc1d3133 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):
More information about the Python-checkins
mailing list