def __getitem__(self, key):
for scene in self.__scenes:<EOL><INDENT>if scene.name == key:<EOL><INDENT>return scene<EOL><DEDENT><DEDENT>if isinstance(key, int):<EOL><INDENT>return self.__scenes[key]<EOL><DEDENT>raise KeyError<EOL>
Return scene by name or by index.