"R. David Murray" wrote:
On Mon, 14 Aug 2000, Jonothan Farr wrote:
Well in Python a list is mutable and a tuple is not.
Right, but he's asking why dtml-in treats tuples in a special way,
and exactly what that behavior is.
That's right :-)
..and in particular why it's so weird. It seems
Chris Withers wrote:
"R. David Murray" wrote:
On Mon, 14 Aug 2000, Jonothan Farr wrote:
Well in Python a list is mutable and a tuple is not.
Right, but he's asking why dtml-in treats tuples in a special way,
and exactly what that behavior is.
That's right :-)
..and in
Shane Hathaway wrote:
Looking at the code, it appears that if you pass a list of two-element
tuples, dtml-in will sort by the first element of each pair and render
the second element.
Unluckilly, that's exactly what I was passing it. But not the result I
was looking for :S
If, on the
Chris Withers wrote:
Shane Hathaway wrote:
Looking at the code, it appears that if you pass a list of two-element
tuples, dtml-in will sort by the first element of each pair and render
the second element.
Unluckilly, that's exactly what I was passing it. But not the result I
was
Shane Hathaway wrote:
snip tuple confusion
I don't know of any place. It ought to be in the DTML reference.
I guess I'll hope and wait for the Zope Book :-)
cheers,
Chris
___
Zope maillist - [EMAIL PROTECTED]
Chris Withers writes:
Why and how are python tuples (like, this) handled differently (and not
in a logical way I can see...) than python lists [like, this]?
The "how" has been explained already.
The "why" is only my guess: support for the widespread idiom
"dict.items()", "objectItems" etc.
Hi,
Why and how are python tuples (like, this) handled differently (and not
in a logical way I can see...) than python lists [like, this]?
cheers,
Chris
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No
Well in Python a list is mutable and a tuple is not.
--jfarr
- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 3:38 PM
Subject: [Zope] dtml-in and tuples
Hi,
Why and how are python tuples (like, this) handled differently