[issue10474] range.count returns boolean

SilentGhost report at bugs.python.org
Sat Nov 20 23:27:00 CET 2010


New submission from SilentGhost <michael.mischurow+bpo at gmail.com>:

>>> a = range(5)
>>> a.count(5)
False
>>> a.count(2)
True

I believe this is related to the issue9213 that introduced count and index method on the range object. According to the documentation accompanying that fix it should return an integer.

----------
components: Interpreter Core
messages: 121799
nosy: SilentGhost
priority: normal
severity: normal
status: open
title: range.count returns boolean
type: behavior
versions: Python 3.2

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


More information about the Python-bugs-list mailing list