[Zope-Coders] Re: [ZPT] CVS: Zope/lib/python/ZTUtils - Tree.py:1.8
Martijn Pieters
mj@zope.com
Thu, 3 Oct 2002 22:38:37 -0400
<Resent to fix list address>
On Thu, Oct 03, 2002 at 04:31:10PM -0700, Jamie Heilman wrote:
> > - if step[:1] == '.':
> > + if step == len(step) * '_':
>
> Woah there cowboy. If I hand you a step that's 5000 bytes long you
> just allocated an additional 5000 bytes to test it. You might wanna
> think about that some more. The old code is really just fine as long
> as you only test the first char for a '_'.
Are you telling me that you are going to use a tree that is 5000 nodes deep,
all expanded? You'll have greater problems with the resulting cookie not
fitting into any browser limit anywhere. Not a likely scenario, no?
--
Martijn Pieters
| Software Engineer mailto:mj@zope.com
| Zope Corporation http://www.zope.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------