Project

Profile

Help

Bug #5342

closed

PyXdmMap and PyXdmArray should be iterable

Added by O'Neil Delpratt about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Python Build
Start date:
2022-02-21
Due date:
% Done:

100%

Estimated time:
Found in version:
11.2
Fixed in version:
11.3
Platforms:

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

Related to SaxonC - Feature #4848: PyXdmValue should be iterableClosedO'Neil Delpratt2020-12-03

Actions

Please register to edit this issue

Also available in: Atom PDF