3 ms·
I would like to see the author debugging an application with 10 levels of object wrapping that had one of the middle object’s name misspelled. Libraries like t
by heavenlyblue 9y ago
I would like to see the author debugging an application with 10 levels of object wrapping that had one of the middle object’s name misspelled.
Libraries like these shine only if they have brilliant tracing and debugging capabilities; otherwise are too easy to reduce to literally a single function.
- doublereedkurt 9y agohttp://glom.readthedocs.io/en/latest/api.html#debugging http://glom.readthedocs.io/en/latest/api.html#debugging affordances to add tracing prints, or drop into a pdb at any level The Inspect specifier type provides a way to get visibility into glom’s evaluation of a specification, enabling debugging of those tricky problems that may arise with unexpected data. Inspect can be inserted into an existing spec in one of two ways. First, as a wrapper around the spec in question, or second, as an argument-less placeholder wherever a spec could be. Inspect supports several modes, controlled by keyword arguments. Its default, no-argument mode, simply echos the state of the glom at the point where it appears: