Nodes/comfy-ovum/_.isNotImplemented
ComfyUI Node

_.isNotImplemented

The check for Python's 'I can't do that' singleton

By sfinktah·Created about a year ago·Updated 10 months ago· 7
_.isNotImplemented
  • obj
  • *

_.isNotImplemented checks whether an object is Python's NotImplemented singleton - the special value that operator methods return when they don't know how to handle a type combination. It's part of the sfinktah/comfy-ovum pack's ovum/underscore family, the auto-generated wrappers around underscore3 (a Python port of Underscore.js). The check is correct: type(self.obj) is type(NotImplemented). The use case is... aspirational.

The README's family warning - work in progress, "not recommended for use in workflows" - is the right lens. This is one of the pure filler nodes that appears because the generator wrapped every method on the underscore3 class, not because anyone building images asked for it.

What it does

When you write a + b, Python tries a.__add__(b); if that returns NotImplemented, Python falls back to trying b.__radd__(a). So NotImplemented is a signal that a type combination isn't supported - and the language uses it internally and swallows it, so it rarely leaks out to user code. type(self.obj) is type(NotImplemented) detects that singleton and nothing else:

  • NotImplementedTrue.
  • None, False, ..., and everything else → False.

The one semi-plausible path to it in a graph: a custom node that evaluates Python expressions (or does arithmetic on mismatched types) could theoretically end up with NotImplemented as a result if it grabs the raw return of an operator method instead of letting Python handle the fallback. If you ever see a mystery value and want to confirm it's that singleton, this node gives you the boolean.

Like the rest of the family, it takes a plain value and returns the boolean, or takes a _.CHAIN from _.chain and keeps the chain going.

Inputs and outputs

  • obj - the only input, type *, optional.
  • Output - a single * socket holding a Python bool (the family's generic-typed output quirk).

Where it fits

The diagnostic curiosity drawer, alongside _.isEllipsis. The _.isX family is genuinely useful as a "what is this mystery value" toolkit - rule out the exotic singletons so you can narrow down what something actually is. _.isNotImplemented is the last check you'd run, and it's a fine last check. Building real logic around it, though, is building logic around a case that shouldn't occur.

Installing it

Install the pack via ComfyUI Manager - search comfy-ovum - or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart ComfyUI. No extra dependencies; underscore3 is vendored in the repo.

Gotchas

  • Only the NotImplemented singleton matches; None and False are different objects and read as False.
  • Normal Python handles NotImplemented internally, so it almost never surfaces as a value you can test.
  • Output wire is *, not BOOLEAN.
Categoryovum/underscore

Inputs (1)

NameTypeDefaultDescription
objopt*Primary input object. Also accepts _.CHAIN to continue chaining.

Outputs (1)

NameTypeDescription
**