Re: IMPORTANT need quick feedback on radical change
Greg Ewing <[email protected]> Fri, 30 Jul 2004 14:38:46 +1200
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Martin Christensen <[email protected]>: > This distinction between lists at tuples exists merely by convention, > and even then it's not consistently used. I think that most of the inconsistency (when it's not simply due to ignorance) is because there are two independent reasons for wanting to use a tuple in Python. One is because conceptually you want a record-like rather than a collection-like structure; the other is because you want something that's hashable for use as a dict key. Sometimes these two requirements are in conflict with each other. If there existed both mutable and immutable tuples, and both mutable and immutable lists, this conflict would disappear, and I think the use of tuples and lists could be made more consistent (given sufficient user education). Whether it's really worth maintaing the two types and associated language syntax I'm not sure. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | [email protected] +--------------------------------------+