Enables dictionary-style access to a latent style by name.
(self, key)
| 10 | for a particular named latent style.""" |
| 11 | |
| 12 | def __getitem__(self, key): |
| 13 | """Enables dictionary-style access to a latent style by name.""" |
| 14 | style_name = BabelFish.ui2internal(key) |
| 15 | lsdException = self._element.get_by_name(style_name) |
| 16 | if lsdException is None: |
| 17 | raise KeyError("no latent style with name '%s'" % key) |
| 18 | return _LatentStyle(lsdException) |
| 19 | |
| 20 | def __iter__(self): |
| 21 | return (_LatentStyle(ls) for ls in self._element.lsdException_lst) |
nothing calls this directly
no test coverage detected