What token is invalid in this arrow call?

The following code does not work

In [1]: import arrow

In [2]: arrow.get(2015, 06, 08, 23, 59)
  File "<ipython-input-2-44d7fca57336>", line 1
    arrow.get(2015, 06, 08, 23, 59)
                         ^
SyntaxError: invalid token

Why does this initialization for arrow docs return an error?

+4
source share
1 answer

Putting a zero in front of a literal number makes it octal. See What do the numbers starting with 0 mean in python? .

Octal numbers can only contain digits 0up to 7.

08 is not a valid octal number.

This has nothing to do with arrow . In this example, octal numbers are not used.

+3
source

All Articles