On Wednesday, January 3, 2024 at 4:55:17 AM UTC-6 Edward K. Ream wrote:

On Tue, Jan 2, 2024 at 7:33 PM Mike Hodson wrote:

But why in all the world is a function called 'es'...

Because g.es gets called a lot, and "es" is a prefix for other functions 
such as g.es_exception.


g.es is a workhorse, but leoGlobals.py contains many other useful functions 
(and a few classes) with longer names.

*g.printObj*(obj) pretty prints objects. I use it all the time for 
debugging. It uses pprint <https://docs.python.org/3/library/pprint.html> 
(Python's pretty printer) only as a fallback.

*g.objToString*(obj) creates a string, so *g.es(g.objToString(obj))* will 
pretty print obj to Leo's log.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/fcb69d9b-3e7c-4906-92c1-c30b63ff0ea2n%40googlegroups.com.

Reply via email to