Skip to content

Instantly share code, notes, and snippets.

@jeamland
Created January 4, 2018 22:33
Show Gist options
  • Save jeamland/269101f77d76c1e1d13acafebcfe4072 to your computer and use it in GitHub Desktop.
Save jeamland/269101f77d76c1e1d13acafebcfe4072 to your computer and use it in GitHub Desktop.
Parsey Weirdness
Python 3.6.4 (default, Dec 19 2017, 15:26:29)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import parse
>>> parse.parse('r{:d}', 'r4')
<Result (4,) {}>
>>> parse.parse('r{:d}', 'r 4')
<Result (4,) {}>
>>> parse.parse('r{:0d}', 'r 4')
<Result (4,) {}>
>>> parse.parse('r{:01d}', 'r 4')
<Result (4,) {}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment