[issue42320] unexpected difference between map and list
New submission from Pierre van de Laar : On windows, with python 3.9, with unittests, My test case fails when I use the following lines of code ``` result = map(lambda x: self.substitute_in_expression(x), sequence.sequence) ``` It works fine with ``` result = list() for x in sequence.sequence: result.append(self.substitute_in_expression(x)) ``` Note that result is used as input for an inherited class instantiation: ``` sequence_type = type(sequence) return sequence_type(result) ``` The classes are constructed using the dataclass decorator! I have unfortunately not have time to make a small reproducer. So I just send the whole project. -- files: bug.zip messages: 380742 nosy: Pierre van de Laar priority: normal severity: normal status: open title: unexpected difference between map and list type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49591/bug.zip ___ Python tracker <https://bugs.python.org/issue42320> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42320] unexpected difference between map and list
Pierre van de Laar added the comment: Zip didn't contain the test cases from the tests directory (sorry for that) -- Added file: https://bugs.python.org/file49592/tests.zip ___ Python tracker <https://bugs.python.org/issue42320> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42320] unexpected difference between map and list
Pierre van de Laar added the comment: Not a bug: tuple is an iterator but an iterator is not a tuple. Yet iterators are often accepted during initialization... -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42320> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36874] Support CDATA by xml.etree.(c)ElementTree
New submission from Pierre van de Laar : I would like to add information to CDATA in an Xml Tree. Turns out I am not the only one: https://stackoverflow.com/questions/174890/how-to-output-cdata-using-elementtree Can the library be extended to also support CDATA (similar to Comment)? Saves a lot of hacking... -- components: XML messages: 342067 nosy: Pierre van de Laar priority: normal severity: normal status: open title: Support CDATA by xml.etree.(c)ElementTree type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue36874> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com