[Patches] [ python-Patches-1696444 ] Adding an index method to tuples
SourceForge.net
noreply at sourceforge.net
Mon Apr 9 18:24:48 CEST 2007
Patches item #1696444, was opened at 2007-04-08 07:35
Message generated for change (Comment added) made by josiahcarlson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1696444&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paul Boddie (pboddie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Adding an index method to tuples
Initial Comment:
This is just a simple copy and paste from the list implementation - not exactly the most elegant solution, but perhaps a demonstration that technical limitations aren't the reason why the tuple doesn't have an index method. I suppose a common sequence function library would be best if such a feature were eventually deemed compelling.
----------------------------------------------------------------------
Comment By: Josiah Carlson (josiahcarlson)
Date: 2007-04-09 09:24
Message:
Logged In: YES
user_id=341410
Originator: NO
Adding an .index method to tuples suggests that a tuple is more or less an
immutable list. This is not the case. Typically tuples are used to hold
disparate pieces of information of different semantics and types, where as
a list typically contains a list of a single type with identical meaning.
For examples we merely need to look at the outputs of str.partition and
str.split .
Suggested close.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1696444&group_id=5470
More information about the Patches
mailing list