Mark Dickinson dicki...@gmail.com added the comment:
No, but they take tuples:
'abcd'.endswith(('a', 'b'))
False
'abcd'.endswith(('c', 'd'))
True
Suggest closing as out of date.
--
nosy: +mark.dickinson
type: behavior - enhancement
versions: +Python 3.3 -Python 3.1
Eric V. Smith e...@trueblade.com added the comment:
It seems like a set would make more sense than a tuple. And if tuples, why not
lists?
Not that it matters much, since I doubt it's worth changing in either case.
It's easy enough for the caller to convert.
--
nosy: +eric.smith
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13755
___
New submission from py.user port...@yandex.ru:
'abcd'.endswith(['a', 'b'])
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: Can't convert 'list' object to str implicitly
it would be nice like in str.join
''.join(('a', 'b'))
'ab'
''.join(['a', 'b'])
'ab'