Skip to content

Commit

Permalink
import from old imp library on older python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rtaycher committed Aug 31, 2020
1 parent 4a687ea commit fc84fa8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/past/builtins/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ def oct(number):
return '0' + builtins.oct(number)[2:]

raw_input = input
from importlib import reload

try:
from importlib import reload
except ImportError:
# for python2, python3 <= 3.4
from imp import reload

unicode = str
unichr = chr
xrange = range
Expand Down

0 comments on commit fc84fa8

Please sign in to comment.