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

2012-01-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

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

2012-01-10 Thread Eric V. Smith
Eric V. Smith 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 Mark Dickinson
Mark Dickinson 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-09 Thread py.user
New submission from py.user : >>> 'abcd'.endswith(['a', 'b']) Traceback (most recent call last): File "", line 1, in 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' >>> ''.join({'a', 'b'})