mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 16:24:11 +03:00
Use dict comprehension in ImageFileDirectory_v2.named()
This commit is contained in:
parent
e24b494f88
commit
42602b69f3
|
@ -523,8 +523,7 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
|
||||
Returns the complete tag dictionary, with named tags where possible.
|
||||
"""
|
||||
return dict((TiffTags.lookup(code).name, value)
|
||||
for code, value in self.items())
|
||||
return {TiffTags.lookup(code).name: value for code, value in self.items()}
|
||||
|
||||
def __len__(self):
|
||||
return len(set(self._tagdata) | set(self._tags_v2))
|
||||
|
|
Loading…
Reference in New Issue
Block a user