Re: [Zope] Re: DTML-tree Custom sort

2005-10-05 Thread J Cameron Cooper
Chris Beaven wrote: It's really more a cool way to do lists than if statements :) It's technically list comprehension. Sort of a one-line list transform tool. I recommend reading through some of Dive Into Python (http://diveintopython.org/) for lots more cool hands-on tips on Python

[Zope] Re: DTML-tree Custom sort

2005-10-02 Thread Chris Beaven
Alex Renier wrote: Thanks for your help AJ I get this: Error Type: SyntaxError Error Value: invalid syntax (line 1) dtml-tree branches_expr=[o for o in objectValues(['Folder'] if hasattr('orderInt'))] sort=orderInt skip_unauthorized I think that Andreas meant dtml-tree branches_expr=[o for

Re: [Zope] Re: DTML-tree Custom sort

2005-10-02 Thread Alex Renier
Great thank you both!!! I never knew you could do if-statements like that. --- Chris Beaven [EMAIL PROTECTED] wrote: Alex Renier wrote: Thanks for your help AJ I get this: Error Type: SyntaxError Error Value: invalid syntax (line 1) dtml-tree branches_expr=[o for o in

[Zope] Re: DTML-tree Custom sort

2005-10-02 Thread Chris Beaven
It's really more a cool way to do lists than if statements :) I recommend reading through some of Dive Into Python (http://diveintopython.org/) for lots more cool hands-on tips on Python programming. Chapter 3 for a good overview of the uses of Python's different data types. Alex Renier