[Patches] [ python-Patches-1382087 ] list.count() patch for feature request 1370948
SourceForge.net
noreply at sourceforge.net
Fri Dec 16 04:15:16 CET 2005
Patches item #1382087, was opened at 2005-12-15 20:57
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1382087&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Fondo (m_fondo)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: list.count() patch for feature request 1370948
Initial Comment:
With patch, list.count() works like list.index() for
start and end parameters
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2005-12-15 22:15
Message:
Logged In: YES
user_id=80475
Other than consistency is there a reason for the patch? I
understand that str.count and list.index both have optional
start/stop arguments, but those both have use cases.
AFAICT, no real-world use cases have been presented for
list.count with start/stop arguments. A quick grep of the
standard library does not reveal ANY code that would be
improved as a result of this patch.
The proposal does have some minor disadvantages: 1)
complicating the signature and docs, 2) introducing a
inter-version incompatability, 3) slowing the method call
(changing from METH_O to METH_ARGS). Unless some offsetting
benefits are shown, this patch should probably not be accepted.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1382087&group_id=5470
More information about the Patches
mailing list