summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-04-03 07:11:39 (GMT)
committerGitHub <noreply@github.com>2024-04-03 07:11:39 (GMT)
commit444156ede44204ef16c9d3cfcb03a637535fd5bf (patch)
treebfaf62af52402c60451346130a28501dd34eca5b /Lib
parent65524ab38875bb0b89fb499531bb772a4fb45b01 (diff)
downloadcpython-444156ede44204ef16c9d3cfcb03a637535fd5bf.zip
cpython-444156ede44204ef16c9d3cfcb03a637535fd5bf.tar.gz
cpython-444156ede44204ef16c9d3cfcb03a637535fd5bf.tar.bz2
gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (#117466)
This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/string_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index cecf309..5ade701 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -1513,9 +1513,9 @@ class StringLikeTest(BaseTest):
x, None, None, None)
self.assertRaisesRegex(TypeError, r'^count\(', s.count,
x, None, None, None)
- self.assertRaisesRegex(TypeError, r'^startswith\(', s.startswith,
+ self.assertRaisesRegex(TypeError, r'^startswith\b', s.startswith,
x, None, None, None)
- self.assertRaisesRegex(TypeError, r'^endswith\(', s.endswith,
+ self.assertRaisesRegex(TypeError, r'^endswith\b', s.endswith,
x, None, None, None)
# issue #15534