peng3d/menu.py
def addLayer(self,layer,z=-1):
        """
        Adds a new layer to the stack, optionally at the specified z-value.
        
        ``layer`` must be an instance of Layer or subclasses.
        
        ``z`` can be used to override the index of the layer in the stack. Defaults to ``-1`` for appending.
        """
        # Adds a new layer to the stack, optionally at the specified z-value
        # The z-value is the index this layer should be inserted in, or -1 for appending
        if not isinstance(layer,Layer):
            raise TypeError("layer must be an instance of Layer!")
        if z==-1:
            self.layers.append(layer)
        else:
            self.layers.insert(z,layer)
def addLayer(self,layer,z=-1):
        """
        Adds a new layer to the stack, optionally at the specified z-value.
        
        ``layer`` must be an instance of Layer or subclasses.
        
        ``z`` can be used to override the index of the layer in the stack. Defaults to ``-1`` for appending.
        """
        # Adds a new layer to the stack, optionally at the specified z-value
        # The z-value is the index this layer should be inserted in, or -1 for appending
        if not isinstance(layer,Layer):
            raise TypeError("layer must be an instance of Layer!")
        if z==-1:
            self.layers.append(layer)
        else:
            self.layers.insert(z,layer)
Adds a new layer to the stack, optionally at the specified z-value.
        
        ``layer`` must be an instance of Layer or subclasses.
        
        ``z`` can be used to override the index of the layer in the stack. Defaults to ``-1`` for appending.