[Patches] [ python-Patches-1382087 ] list.count() patch for feature request 1370948

SourceForge.net noreply at sourceforge.net
Fri Dec 16 16:04:20 CET 2005


Patches item #1382087, was opened at 2005-12-15 19:57
Message generated for change (Comment added) made by m_fondo
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: Rejected
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: Mike Fondo (m_fondo)
Date: 2005-12-16 09:04

Message:
Logged In: YES 
user_id=1406113

With those considerations in mind, I can't disagree. 
Rejecting would be best.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-12-15 21: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