On Wed, 7 Jan 2009 17:53:30 -0600
"Edward K. Ream" <[email protected]> wrote:
> > Is it ok to change it by adding
> >
> > if not stack:
> > return None
> >
> > just before v,n = stack.pop()?
>
> No. Top-level positions can have an empty stack.
>
> The following tests are the recommend way to test p.v::
Ok, but I want to pass vnodes to c.vnode2position for which there is
no position - of course I don't know that, I want c.vnode2position to
tell me that. At the moment I'd have to catch an AssertionError, which
seems silly. How about changing
assert c.positionExists(p)
to
if not c.positionExists(p):
return None
?
Cheers -Terry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---