def set(self, value, custom_command=True):
        """Set obj text.

        Parameters
        ==========
        value (int, float or None, depends on valid types)
            value to be held by the widget.
        custom_command (boolean)
            indicates whether to execute self.command if the
            value is actually changed.
        """
        ### return if value isn't of allowed type

        ## try validating type
        try:
            self.validate_type(value)

        ## if a type/value error is raised, report it
        ## by printing, then exit this method by
        ## returning

        except (TypeError, ValueError) as err:

            ### TODO probably display error in statusbar
            ### or user logger, instead of printing
            print("From intfloat widget:", err)
            return

        ### override the value by evaluating its string;
        ###
        ### this will cause the value to be clamped in case
        ### its value isn't allowed yet
        value = self.evaluate_string(str(value))

        ### return if value and type are already set

        if (
            value == self.value
            and (type(value) is type(self.value))
        ):
            return

        ### otherwise store the value
        self.value = value

        ### then set value as the contents of the line
        ### (convert to string first)
        self.cursor.set(str(value))

        ### also update the image
        self.update_image()

        ### also, if requested, execute custom command
        if custom_command:
            self.command()
Set obj text.

        Parameters
        ==========
        value (int, float or None, depends on valid types)
            value to be held by the widget.
        custom_command (boolean)
            indicates whether to execute self.command if the
            value is actually changed.
        
nodezator/widget/intfloatentry/op.py