Skip to content

Commit

Permalink
allows python3.5 to build alongside < 3.5 (#2457)
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamannett authored and fchollet committed Apr 21, 2016
1 parent 423a633 commit 61dd53e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/autogen.py
Expand Up @@ -53,10 +53,16 @@
'''
from __future__ import print_function
from __future__ import unicode_literals

import re
import inspect
import os
import shutil
import sys
if sys.version[0] == '2':
reload(sys)
sys.setdefaultencoding('utf8')

from keras.layers import convolutional
from keras.layers import recurrent
Expand Down Expand Up @@ -250,8 +256,6 @@ def get_function_signature(function, method=True):
for a, v in kwargs:
if type(v) == str:
v = '\'' + v + '\''
elif type(v) == unicode:
v = 'u\'' + v + '\''
st += str(a) + '=' + str(v) + ', '
if kwargs or args:
return st[:-2] + ')'
Expand Down

0 comments on commit 61dd53e

Please sign in to comment.