[Python-Dev] [patch] fpconst for python3 (original) (raw)

Neal Becker ndbecker2 at gmail.com
Wed Oct 20 02:57:22 CEST 2010


Where should I send this patch?

diff -u fpconst-0.7.2/fpconst.py fpconst-0.7.2.new/fpconst.py --- fpconst-0.7.2/fpconst.py 2005-02-24 12:42:03.000000000 -0500 +++ fpconst-0.7.2.new/fpconst.py 2010-10-19 20:55:07.407765664 -0400 @@ -40,18 +40,18 @@ ident = "$Id: fpconst.py,v 1.16 2005/02/24 17:42:03 warnes Exp $" import struct, operator +from functools import reduce # check endianess -_big_endian = struct.pack('i',1)[0] != '\x01'

+_big_endian = struct.pack('i',1)[0] != 1

and define appropriate constants

if(_big_endian):

def _double_as_bytes(dval):



More information about the Python-Dev mailing list