From 3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 29 May 2012 16:42:39 +0000 Subject: Apparently in python bools are ints, but ints aren't bools...this means that you have to test for bool before int or bools are converted to ints. This is fixed now, bools transfer correctly. --- python/test.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'python/test.py') diff --git a/python/test.py b/python/test.py index f4e679a..fa9c79a 100755 --- a/python/test.py +++ b/python/test.py @@ -2,12 +2,9 @@ import gats -print gats.load( open('test.gats', 'rb') ) +print isinstance( True, bool ) +print isinstance( True, int ) +print isinstance( 1, bool ) +print isinstance( 1, int ) -gats.dump( 3.14159, open('out.gats', 'wb') ) - -print gats.loads( - gats.dumps( - 500.12345 - ) - ) +print gats.loads( gats.dumps( 0 ) ) -- cgit v1.2.3