def _list_macros(self, name="all", retval="", error=False):
        retval += "Available macros:\n"
        if name in ["all", "system"]:
            retval += "    System:\n"
            for macro in sorted(self.macros.keys()):
                retval += "        %s\n" % macro
        if ["all", "learned"] in name:
            retval += "    Learned:\n"
            for macro in sorted(self.learned.keys()):
                retval += "        %s\n" % macro
        if error:
            self.kernel.Error(retval)
        else:
            self.kernel.Print(retval)
dataset/ETHPy150Open Calysto/metakernel/metakernel/magics/macro_magic.py/MacroMagic._list_macros/swapped operands of `in`