MaybeEgging

class PlasmaCalcs.hookups.mage.gamera.gamera_egg_loader.MaybeEgging(cc, egging)

Bases: object

context manager for maybe eggifying stuff.

upon entry, if egging, enter cc.using(slices=cc._egg_slices()).
calling self(value) returns cc.eggify(value) if egging, else value.
upon exit, if egging, exit the cc.using context.
(if not egging, entry and exit do nothing)
Usage pattern:
egging = True # or False
with MaybeEgging(cc, egging=egging) as et: # et for “egging tracker”
result = et(cc(…)) # <– result eggified if egging, else untouched.