Serhiy Storchaka added the comment:
This proposition conflicts with optional parameters of str.startswith().
>>> 'test'.startswith(('a', 'b', 'c'), 1, 3)
False
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Ethan Furman added the comment:
We can already do
--> some_string.starts_with(('innie','minnie', 'minie', 'moe'))
Your proposal appears to be equivalent to:
--> 'test'.startswith(('a', 'b', 'c'))
How often do you check to see if a string starts with only a single character?
-1
tuple() is th
New submission from Elizabeth Myers:
str.startswith and str.endswith should accept multiple arguments when passing
in strings. This makes it easier to check if the first character of a string is
one of a given option, versus this awkward construction:
>>> f = 'abc'
>>> 'test'.startswith(tuple(