Re: When is a number not a number

ValueError: invalid literal for int() with base 10: '²²²²²²²²²²'
Probably a bug in _checkNumber(): https://github.com/lxml/lxml/blob/d01872ccdf7e1e5e825b6c6292b43e7d27ae 5fc4/src/lxml/objectify.pyx#L974
str.isdigit() accepts many Unicode characters classified as digits that int() rejects.
Marius Gedminas
So maybe isdecimal() would be more appropriate in _checkNumber()?
"22222".isdecimal() True "²²²²²".isdecimal() False
Holger Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart HRA 4356, HRA 104 440 Amtsgericht Mannheim HRA 40687 Amtsgericht Mainz Die LBBW verarbeitet gemaess Erfordernissen der DSGVO Ihre personenbezogenen Daten. Informationen finden Sie unter https://www.lbbw.de/datenschutz.
participants (1)
-
Holger.Joukl@LBBW.de