INNER CODE UNIT · Python

clone

theyosh/TerrariumPI · contrib/pipes/__init__.py:107

    def clone(self):
        """t.clone() returns a new pipeline template with identical
        initial state as the current one."""
        t = Template()
        t.steps = self.steps[:]
        t.debugging = self.debugging
        return t

    def debug(self, flag):
        """t.debug(flag) turns debugging on or off."""
        self.debugging = flag

    def append(self, cmd, kind):
        """t.append(cmd, kind) adds a new step at the end."""
        if not isinstance(cmd, str):
            raise TypeError("Template.append: cmd must be a string")
        if kind not in stepkinds:
            raise ValueError("Template.append: bad kind %r" % (kind,))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…