summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/operator.py
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/operator.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/operator.py')
-rw-r--r--contrib/tools/python3/src/Lib/operator.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/tools/python3/src/Lib/operator.py b/contrib/tools/python3/src/Lib/operator.py
index 9cc5b89958d..241fdbb679e 100644
--- a/contrib/tools/python3/src/Lib/operator.py
+++ b/contrib/tools/python3/src/Lib/operator.py
@@ -155,10 +155,10 @@ def contains(a, b):
return b in a
def countOf(a, b):
- "Return the number of items in a which are, or which equal, b."
+ "Return the number of items in a which are, or which equal, b."
count = 0
for i in a:
- if i is b or i == b:
+ if i is b or i == b:
count += 1
return count
@@ -173,7 +173,7 @@ def getitem(a, b):
def indexOf(a, b):
"Return the first index of b in a."
for i, j in enumerate(a):
- if j is b or j == b:
+ if j is b or j == b:
return i
else:
raise ValueError('sequence.index(x): x not in sequence')
@@ -302,11 +302,11 @@ class methodcaller:
"""
__slots__ = ('_name', '_args', '_kwargs')
- def __init__(self, name, /, *args, **kwargs):
- self._name = name
+ def __init__(self, name, /, *args, **kwargs):
+ self._name = name
if not isinstance(self._name, str):
raise TypeError('method name must be a string')
- self._args = args
+ self._args = args
self._kwargs = kwargs
def __call__(self, obj):