New submission from py.user <[email protected]>:
>>> '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'
>>> ''.join({'a', 'b'})
'ab'
>>> ''.join({'a': 1, 'b': 2})
'ab'
>>>
----------
components: Interpreter Core
messages: 151002
nosy: py.user
priority: normal
severity: normal
status: open
title: str.endswith and str.startswith do not take lists of strings
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13755>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com