Commits

Jason R. Coombs committed 5e3383f

Use int instead of long (seems sufficient on Python 2 and 3)

  • Participants
  • Parent commits ba86e32

Comments (0)

Files changed (1)

File irc/client.py

     >>> ip_numstr_to_quad(3232235521)
     '192.168.0.1'
     """
-    n = long(num)
+    n = int(num)
     packed = struct.pack('>L', n)
     bytes = struct.unpack('BBBB', packed)
     return ".".join(map(str, bytes))
     >>> ip_quad_to_numstr('192.168.0.1')
     '3232235521'
     """
-    bytes = map(long, quad.split("."))
+    bytes = map(int, quad.split("."))
     packed = struct.pack('BBBB', *bytes)
     return str(struct.unpack('>L', packed)[0])