PR #3841 <https://github.com/leo-editor/leo-editor/pull/3841> (now in Leo's
"devel" branch) adds two spectacularly useful tracing functions:
*g.traceUnique* and *g.traceUniqueClass*.
Both functions take one *value *argument (which can be of any type) and one
keyword-only *n* argument that defaults to 2.
*g.traceUnique(value) *prints caller/*value *pairs:
f"{g.callers(n):30} {str(value)}"
but *only once* for each unique combination of g.callers(n) and str(value).
*g.traceUniqueClass(value)* prints caller/*class-name* pairs:
f"{g.callers(n):30} {value.__class__.__name__}"
Again, just once for each caller/class-name pair.
*Summary*
g.traceUniqueClass is *perfect* for discovering the proper annotation for
any argument!
How did I ever live without these new functions?
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/82a411a2-9380-40c9-8afd-65edad26dcdfn%40googlegroups.com.