[issue12163] str.count

py.user report at bugs.python.org
Tue May 24 04:10:26 CEST 2011


New submission from py.user <port139 at yandex.ru>:

specification says
[code]
str.count(sub[, start[, end]])

    Return the number of non-overlapping occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.
[/code]

[code]
>>> ''.count('', None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: slice indices must be integers or None or have an __index__ method
>>>
[/code]

----------
messages: 136713
nosy: py.user
priority: normal
severity: normal
status: open
title: str.count
type: behavior
versions: Python 2.7, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12163>
_______________________________________


More information about the Python-bugs-list mailing list