Leo is hanging in various strange ways at present when using Py3k.
For example, when scanning @menus trees in settings files.

To find out what is happening, I put various traces in the code, and
also put in code to terminate the scan after 1000 nodes had been
scanned.  This shows that loops are not being terminated as expected
and (presumably) as they are terminated when run using Python 2.x.

My first thought was that an iterator had gone wrong.  But how could
that be?  The exact same code works in Python 2.x.  The only
difference is that the next method of an iterator must be called
__next__ in Python 3.x.  Each iterator now contains the assignment
'__next__ = next'.  Not likely to be the problem.

But there is one new method in Python 3.x, the __bool__ method.  If
this goes wrong, loops like 'while p != after' will run way too long.
A promising hypothesis.

I'm writing this before verifying that this is the problem.  I'll test
the hypothesis by leaving the loop if p.headString() ==
after.headString().  If this does indeed terminate the loop properly
I'll be more sure that __bool__ is the culprit.  I can then attempt a
proof that __bool__ is, in fact, responsible.

The point of all this is simply that worthy bugs demand solid proofs
that they have been solved.  It's invalid simply to change code and
hope that it solves the problem.

Edward
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to