Many thanks to all who have suggested various languages to study.  However, 
python already has all the language features I have ever wanted.  I'm not 
looking for a better language, I'm looking for better ways to use python.

So I am looking for patterns that I can transfer from other languages to 
Leo's python code base.

Vitalije has already opened my eyes to the benefits of stateless code.  The 
new version of at.writeAll in the at-others branch highlights this 
pattern.  Here is the essence of the new at.writeAll:

files, root = at.findFilesToWrite()
for p in files:
    at.writeAllHelper(p, root)

Splitting the task this way is a big step forward.  The new 
at.findFilesToWrite method disentangles a computation that used to require 
complex state in at.writeAllHelper. 

Edward

P. S. Conversely, Leo's code contains anti-patterns that are holdovers from 
its C language days.  For several years I have been replacing index-based 
computations (g.skip*) with regex's when I revise code.

There are also some Python anti-patterns, including the g.TypedDict 
classes. Now that Leo requires Python 2.6+, the code could use subclasses 
of dict. 

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to