##// END OF EJS Templates
Merge branch PR 2445 into master...
Matthias BUSSONNIER -
r8512:3066da7a merge
parent child Browse files
Show More
@@ -25,6 +25,9 b' from __future__ import print_function'
25 25
26 26 import __builtin__
27 27
28 import sys
29
30
28 31 from IPython.config.configurable import Configurable
29 32 from IPython.utils import io
30 33 from IPython.utils.traitlets import Instance, List
@@ -266,5 +269,7 b' class DisplayHook(Configurable):'
266 269 self.shell.user_ns.update({'_':None,'__':None, '___':None})
267 270 import gc
268 271 # TODO: Is this really needed?
269 gc.collect()
272 # IronPython blocks here forever
273 if sys.platform != "cli":
274 gc.collect()
270 275
@@ -927,11 +927,15 b' else:'
927 927 def validate(self, obj, value):
928 928 if isinstance(value, int):
929 929 return value
930 elif isinstance(value, long):
930 if isinstance(value, long):
931 931 # downcast longs that fit in int:
932 932 # note that int(n > sys.maxint) returns a long, so
933 933 # we don't need a condition on this cast
934 934 return int(value)
935 if sys.platform == "cli":
936 from System import Int64
937 if isinstance(value, Int64):
938 return int(value)
935 939 self.error(obj, value)
936 940
937 941
General Comments 0
You need to be logged in to leave comments. Login now