could do extra['myvariable'] in templates
This commit is contained in:
@ -184,6 +184,11 @@ class RougailExtra:
|
||||
except KeyError:
|
||||
raise AttributeError(f'unable to find extra "{key}"')
|
||||
|
||||
def __getitem__(self,
|
||||
key: str,
|
||||
) -> Any:
|
||||
return self.__getattr__(key)
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self._suboption.values())
|
||||
|
||||
|
Reference in New Issue
Block a user