parameters: (self, name, shape=None)
docstring: Adds a turtle shape to TurtleScreen's shapelist.
  
          Arguments:
          (1) name is the name of a gif-file and shape is None.
              Installs the corresponding image shape.
              !! Image-shapes DO NOT rotate when turning the turtle,
              !! so they do not display the heading of the turtle!
          (2) name is an arbitrary string and shape is a tuple
              of pairs of coordinates. Installs the corresponding
              polygon shape
          (3) name is an arbitrary string and shape is a
              (compound) Shape object. Installs the corresponding
              compound shape.
          To use a shape, you have to issue the command shape(shapename).
  
          call: register_shape("turtle.gif")
          --or: register_shape("tri", ((0,0), (10,10), (-10,10)))
  
          Example (for a TurtleScreen instance named screen):
          >>> screen.register_shape("triangle", ((5,-3),(0,5),(-5,-3)))
docstring_summary: Adds a turtle shape to TurtleScreen's shapelist.
docstring_tokens: Adds a turtle shape to TurtleScreen s shapelist .
function: def register_shape(self, name, shape=None):
          """Adds a turtle shape to TurtleScreen's shapelist.
  
          Arguments:
          (1) name is the name of a gif-file and shape is None.
              Installs the corresponding image shape.
              !! Image-shapes DO NOT rotate when turning the turtle,
              !! so they do not display the heading of the turtle!
          (2) name is an arbitrary string and shape is a tuple
              of pairs of coordinates. Installs the corresponding
              polygon shape
          (3) name is an arbitrary string and shape is a
              (compound) Shape object. Installs the corresponding
              compound shape.
          To use a shape, you have to issue the command shape(shapename).
  
          call: register_shape("turtle.gif")
          --or: register_shape("tri", ((0,0), (10,10), (-10,10)))
  
          Example (for a TurtleScreen instance named screen):
          >>> screen.register_shape("triangle", ((5,-3),(0,5),(-5,-3)))
  
          """
          if shape is None:
              # image
              if name.lower().endswith(".gif"):
                  shape = Shape("image", self._image(name))
              else:
                  raise TurtleGraphicsError("Bad arguments for register_shape.\n"
                                            + "Use  help(register_shape)" )
          elif isinstance(shape, tuple):
              shape = Shape("polygon", shape)
          ## else shape assumed to be Shape-instance
          self._shapes[name] = shape
function_tokens: def register_shape ( self , name , shape = None ) : if shape is None : # image if name . lower ( ) . endswith ( ".gif" ) : shape = Shape ( "image" , self . _image ( name ) ) else : raise TurtleGraphicsError ( "Bad arguments for register_shape.\n" + "Use  help(register_shape)" ) elif isinstance ( shape , tuple ) : shape = Shape ( "polygon" , shape ) ## else shape assumed to be Shape-instance self . _shapes [ name ] = shape