- py_dict
- *
_.functions returns a sorted list of the names of every function property on an object. That's the whole job: given an object, list its callable members. It's an introspection tool, not a data transformer - the kind of node you reach for when you're poking at a live Python object in the graph and want to know what it can do.
It's one of the _.* nodes in sfinktah/comfy-ovum, the auto-generated wrappers around underscore3 (a Python port of Underscore.js). Display name _.functions, class UnderscoreFunctions, under ovum/underscore.
The inputs that matter
- py_dict - the object to inspect (loose
*; also accepts a_.CHAIN). Namedpy_dictto signal it expects an object.
Output is a loose * - in practice a sorted list of method-name strings.
The honest catch
This one is thinner than it looks, and I verified why. The port implements functions by iterating the object - and on a plain Python dict of data (which is what you'll almost always have in a ComfyUI graph) there are no function properties, so you get an empty list. And on an arbitrary Python object that isn't iterable, the call actually raises instead of returning a friendly list. The JS original works because it walks a prototype chain; the Python port's shortcut doesn't translate.
So: useful in theory for inspecting objects that genuinely carry methods, rough in practice on the data dicts ComfyUI deals in. If you're debugging what a node object can do, you'll get more from reading its source or the status line on its output.
Why you'd reach for it
The niche case is documentation-on-the-fly: you have some object flowing through a workflow and want to confirm which callable names exist before wiring a _.get or _.hasCallable against it. Even there, the empty-list behavior on plain dicts will send you looking elsewhere. This is the node I'd call the least broadly useful in the family.
Install
Same pack, same steps. ComfyUI Manager, search "comfy-ovum", or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart, under ovum/underscore. No models, no downloads.
Honest warnings
The README's family disclaimer applies with interest - work in progress, "an absolute disaster to use in production." Expect empty lists on data dicts and don't be surprised by errors on non-iterable objects. Chain rule: chain in, chain out, _.value to unwrap.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| py_dictopt | * | Primary input object (expected object). You can still pass any JSON-serializable value. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |