def index(self):
for i in range(len(self.canvas.layers)):<EOL><INDENT>if self.canvas.layers[i] == self: break<EOL><DEDENT>if self.canvas.layers[i] == self: <EOL><INDENT>return i<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Returns this layer's index in the canvas.layers[].

        Searches the position of this layer in the canvas'
        layers list, return None when not found.