Drop leading 0's from numeric literals

Not compatible with Python3. Makes the code more forward compatible with
modern Pythons.

In Python2, it was an alternative syntax for octal.

$ python3
>>> 01
  File "<stdin>", line 1
    01
     ^
SyntaxError: invalid token
This commit is contained in:
Jon Dufresne 2017-12-01 18:57:43 -08:00
parent a51160317c
commit 56ec575351

View File

@ -1619,7 +1619,7 @@ class RangeCasterTestCase(ConnectingTestCase):
from psycopg2.tz import FixedOffsetTimezone
cur = self.conn.cursor()
d1 = date(2012, 01, 01)
d1 = date(2012, 1, 1)
d2 = date(2012, 12, 31)
r = DateRange(d1, d2)
cur.execute("select %s", (r,))