We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some pymods.Record functions that return sorted lists of NamedTuples including lxml elements cause comparison error when there is a repeated element.
Given the structure:
<name> <namePart>Cash</namePart> </name> <name> <namePart>Cash</namePart> </name>
pymods will create the tuples: Name('Cash', '', '', '', '', '', lxml.Element pointer A) Name('Cash', '', '', '', '', '', lxml.Element pointer B)
Name('Cash', '', '', '', '', '', lxml.Element pointer A)
Name('Cash', '', '', '', '', '', lxml.Element pointer B)
The only unique tuple element for sorting is the element pointer, but comparisons between lxml.Elements is not allowed:
TypeError: '<' not supported between instances of 'lxml.etree._Element' and 'lxml.etree._Element'
Really there's no reason for any pymods.Record function or property to return a sorted list. Removing the sort()'s would easily fix this.
sort()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some pymods.Record functions that return sorted lists of NamedTuples including lxml elements cause comparison error when there is a repeated element.
Given the structure:
pymods will create the tuples:
Name('Cash', '', '', '', '', '', lxml.Element pointer A)
Name('Cash', '', '', '', '', '', lxml.Element pointer B)
The only unique tuple element for sorting is the element pointer, but comparisons between lxml.Elements is not allowed:
TypeError: '<' not supported between instances of 'lxml.etree._Element' and 'lxml.etree._Element'
Really there's no reason for any pymods.Record function or property to return a sorted list. Removing the
sort()
's would easily fix this.The text was updated successfully, but these errors were encountered: