[Zope] dtml question: xrange?
Paul Everitt
Paul@digicool.com
Mon, 19 Jul 1999 08:51:44 -0400
I see that Alexander answered the question, so I'll provide the answer
to "Why not?"
Zope tries to prevent people from resource attacks via TTW editing. One
way that Jim Fulton worked pretty hard on was preventing people from
creating huge sequences, such as with the range function(s).
--Paul
> -----Original Message-----
> From: Alexander Staubo [mailto:alex@mop.no]
> Sent: Sunday, July 18, 1999 7:28 PM
> To: Zope Mailing List (E-mail); 'Kevin Lewandowski'
> Subject: RE: [Zope] dtml question: xrange?
>
>
> For this and any other operation not directly supported by the DTML
> "API", you can write External Methods to provide the service. In this
> case, a function such as:
>
> def XRange(start, stop, step):
> return xrange(start, stop, step)
>
> would do it.
>
> --
> Alexander Staubo http://www.mop.no/~alex/
> "What the hell, he thought, you're only young once, and threw
> himself out of the window. That would at least keep the element of
> surprise on his side."
> --Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
>
> >-----Original Message-----
> >From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
> >Behalf Of Kevin
> >Lewandowski
> >Sent: 19. juli 1999 01:00
> >To: zope@zope.org
> >Subject: [Zope] dtml question: xrange?
> >
> >
> >Is there a way to generate a range in dtml? (like the python xrange()
> >function) Specifically, I want to iterate from 0 to a variable
> >(comes from
> >a form) using the #in tag.
> >
> >I couldn't find anything about this in the docs.
> >
> >any ideas?
> >
> >thanks,
> >
> >Kevin
> >
> >_______________________________________________
> >Zope maillist - Zope@zope.org
> >http://www.zope.org/mailman/listinfo/zope
> >
> >(For developer-specific issues, use the companion list,
> >zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
> >
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>