Feature request: consistent getter/setter API for EXIF/IPTC/XMP
Bug #617557 reported by
fredp
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
Fix Released
|
High
|
Olivier Tilloy |
Bug Description
The difference introduced in 0.2 when accessing IPTC tags vs. EXIF/XMP ("values"instead of "value"), although understandable from a semantic point of view, is more hindrance than help in real-life code.
The type of the returned XMP tags generally needs to be checked anyway, and the different syntax makes it harder to use clean generic loops to iterate through the three sorts of tags in a picture collection.
It would be useful to be able to access IPTC tags with "value" just like EXIF and XMP, even if the "values" method remains as an alias for backward compatibility.
TIA,
fp
summary: |
- Feature request: consistent getter API for EXIF/IPTC/XMP + Feature request: consistent getter/setter API for EXIF/IPTC/XMP |
Changed in pyexiv2: | |
status: | Confirmed → In Progress |
Changed in pyexiv2: | |
milestone: | none → 0.3 |
Changed in pyexiv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Agreed, what was designed to be semantically correct proves an obstacle for application developers.
This was already mentioned on pyexiv2 developers’ mailing list (I can’t seem to find the thread in the archive now).
I suggest adding a "value" getter/setter for IPTC tags (just like EXIF and XMP tags) that will be an alias for the "values" getter/setter (so as not to break existing code). "values" could also be marked as deprecated, raising a warning when used, in which case the documentation should be updated accordingly. Comments welcome.