[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-10 Thread Mark Dickinson
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

[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-10 Thread Eric V. Smith
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

[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13755 ___

[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-09 Thread py.user
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'