Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Sphinx / tests / roots / test-ext-autodoc / target / partialmethod.py
Size: Mime:
# for py34 or above
from functools import partialmethod


class Cell(object):
    """An example for partialmethod.

    refs: https://docs.python.jp/3/library/functools.html#functools.partialmethod
    """

    def set_state(self, state):
        """Update state of cell to *state*."""

    #: Make a cell alive.
    set_alive = partialmethod(set_state, True)

    # a partialmethod with no docstring
    set_dead = partialmethod(set_state, False)