class_docstr: Extension of the stringPict class that knows about basic math applications,
  optimizing double minus signs.
  
  "Binding" is interpreted as follows::
  
      ATOM this is an atom: never needs to be parenthesized
      FUNC this is a function application: parenthesize if added (?)
      DIV  this is a division: make wider division if divided
      POW  this is a power: only parenthesize if exponent
      MUL  this is a multiplication: parenthesize if powered
      ADD  this is an addition: parenthesize if multiplied or powered
      NEG  this is a negative number: optimize if added, parenthesize if
           multiplied or powered
      OPEN this is an open object: parenthesize if added, multiplied, or
           powered (example: Piecewise)
class_docstr_tok: ["Extension","of","the","stringPict","class","that","knows","about","basic","math","applications",",","optimizing","double","minus","signs",".","``","Binding","''","is","interpreted","as","follows",":",":","ATOM","this","is","an","atom",":","never","needs","to","be","parenthesized","FUNC","this","is","a","function","application",":","parenthesize","if","added","(","?",")","DIV","this","is","a","division",":","make","wider","division","if","divided","POW","this","is","a","power",":","only","parenthesize","if","exponent","MUL","this","is","a","multiplication",":","parenthesize","if","powered","ADD","this","is","an","addition",":","parenthesize","if","multiplied","or","powered","NEG","this","is","a","negative","number",":","optimize","if","added",",","parenthesize","if","multiplied","or","powered","OPEN","this","is","an","open","object",":","parenthesize","if","added",",","multiplied",",","or","powered","(","example",":","Piecewise",")"]
docstr: Make a pretty multiplication.
  Parentheses are needed around +, - and neg.
docstr_tok: ["Make","a","pretty","multiplication",".","Parentheses","are","needed","around","+",",","-","and","neg","."]
code: def __mul__(self, *others):
      """Make a pretty multiplication.
      Parentheses are needed around +, - and neg.
      """
      quantity = {"degree": "\N{DEGREE SIGN}"}
  
      if len(others) == 0:
          return self  # We aren't actually multiplying... So nothing to do here.
  
      # add parens on args that need them
      arg = self
      if arg.binding > prettyForm.MUL and arg.binding != prettyForm.NEG:
          arg = stringPict(*arg.parens())
      result = [arg]
      for arg in others:
          if arg.picture[0] not in quantity.values():
              result.append(xsym("*"))
          # add parentheses for weak binders
          if (
              arg.binding > prettyForm.MUL
              and arg.binding != prettyForm.NEG
          ):
              arg = stringPict(*arg.parens())
          result.append(arg)
  
      len_res = len(result)
      for i in range(len_res):
          if (
              i < len_res - 1
              and result[i] == "-1"
              and result[i + 1] == xsym("*")
          ):
              # substitute -1 by -, like in -1*x -> -x
              result.pop(i)
              result.pop(i)
              result.insert(i, "-")
      if result[0][0] == "-":
          # if there is a - sign in front of all
          # This test was failing to catch a prettyForm.__mul__(prettyForm("-1", 0, 6)) being negative
          bin = prettyForm.NEG
          if result[0] == "-":
              right = result[1]
              if right.picture[right.baseline][0] == "-":
                  result[0] = "- "
      else:
          bin = prettyForm.MUL
      return prettyForm(binding=bin, *stringPict.next(*result))
  
imports: import shutil
  from .pretty_symbology import hobj, vobj, xsym, xobj, pretty_use_unicode, line_width, center
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 5 for calling the prettyForm obj's underlying member method code with example usage: obj.__mul__() and returns: prettyForm, self