def __repr__(self) -> str:
        """Return a representation of this Mouse object."""
        params = []
        for attr in ["x", "y", "dx", "dy", "cx", "cy", "dcx", "dcy"]:
            if getattr(self, attr) == 0:
                continue
            params.append("%s=%r" % (attr, getattr(self, attr)))
        for attr in [
            "lbutton",
            "rbutton",
            "mbutton",
            "lbutton_pressed",
            "rbutton_pressed",
            "mbutton_pressed",
            "wheel_up",
            "wheel_down",
        ]:
            if getattr(self, attr):
                params.append("%s=%r" % (attr, getattr(self, attr)))
        return "tcod.Mouse(%s)" % ", ".join(params)
def __repr__ ( self ) -> str : params = [ ] for attr in [ "x" , "y" , "dx" , "dy" , "cx" , "cy" , "dcx" , "dcy" ] : if getattr ( self , attr ) == 0 : continue params . append ( "%s=%r" % ( attr , getattr ( self , attr ) ) ) for attr in [ "lbutton" , "rbutton" , "mbutton" , "lbutton_pressed" , "rbutton_pressed" , "mbutton_pressed" , "wheel_up" , "wheel_down" , ] : if getattr ( self , attr ) : params . append ( "%s=%r" % ( attr , getattr ( self , attr ) ) ) return "tcod.Mouse(%s)" % ", " . join ( params )
Return a representation of this Mouse object.