Actions
Bug #5342
closedPyXdmMap and PyXdmArray should be iterable
Start date:
2022-02-21
Due date:
% Done:
100%
Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
11.2
Fixed in version:
11.3
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
Reported by user here: https://saxonica.plan.io/boards/4/topics/8571
As mentioned in the forum post it should be possible to iterate over a sequence of PyXdmMap in a for loop. Currently the following snippet:
for item in xdm_value:
print(isinstance(item, PyXdmItem))
print(isinstance(item, PyXdmMap))
print(item)
Give the error:
Traceback (most recent call last):
File "C:\SomePath\arrays-and-maps\createSequenceOfMapsTest1.py", line 18, in <module>
print(item)
TypeError: __str__ returned non-string (type NoneType)
Related issues
Updated by O'Neil Delpratt almost 3 years ago
- Related to Feature #4848: PyXdmValue should be iterable added
Updated by O'Neil Delpratt almost 3 years ago
- Status changed from New to Resolved
PyXdmMap is iterable on the keys. Also further fix in the item_at() method on the XmdValue to support PyXdmMap and PyXdmArray.
Updated by O'Neil Delpratt almost 3 years ago
- % Done changed from 0 to 100
PyXdmArray
is iterable on the values.
Updated by O'Neil Delpratt over 2 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 11.3
Bug fix applied in the SaxonC 11.3 maintenance release.
Please register to edit this issue
Actions