r1chardj0n3s / parse

Parse strings using a specification based on the Python format() syntax.
http://pypi.python.org/pypi/parse
MIT License
1.72k stars 101 forks source link

Several bugs with parsing hex, bin and oct numbers. #103

Closed vladikcomper closed 4 years ago

vladikcomper commented 4 years ago

This PR fixes issues #83, #102 and provides a proper fix for the issue #65.

Some additional tests have been added in parse_test.py to ensure the provided fixes work as intended.

Several bugs were identified in the source code, mainly in the _intconvert function. Their fixes were split in several commits and comprehensively documented.

I hope this PR will help to make recognizing and decoding of non-decimal numbers substantially more stable.

r1chardj0n3s commented 4 years ago

Thanks for the great fixes!