Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythonfunctools lru_cache partialSingle-choice MCQ

What does `partialmethod` produce when `set_on` is called?

import functools class Cell: def _set(self, state, value): self.state = (value, state) set_on = functools.partialmethod(_set, value=True) c = Cell() c.set_on(state="x") print(c.state)