Feature request: consistent getter/setter API for EXIF/IPTC/XMP

Bug #617557 reported by fredp
6
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

Revision history for this message
Olivier Tilloy (osomon) wrote :

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.

Changed in pyexiv2:
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → High
status: New → Confirmed
Olivier Tilloy (osomon)
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
Revision history for this message
Olivier Tilloy (osomon) wrote :

Implemented with revision 332 of the trunk.

Changed in pyexiv2:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in pyexiv2:
milestone: none → 0.3
Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.