On Apr 8, 5:11 am, "Ville M. Vainio" <[email protected]> wrote:
> Verified, seems to work as before.

Now that we have a stable code base again, there are two comments I'd
like to make about my changes:

1. The tests 'p is None' or 'p is not None' are dubious, at best,
because p could be an "empty" position.

The correct tests are 'not p'  or 'p', respectively, because they use
the p.__eq__ and all the other special methods in:

Code-->Core classes-->@file leoNodes.py-->class position--> p.ctor &
other special methods...

2.  I always rewrite tests of the form:

    if not condition:
        statements1
    else:
        statements2

to:

    if condition:
        statements2
    else:
        statements1

The latter is always significantly clearer, imo.

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