chiark / gitweb /
catacomb/__init__.py: Use `%#x' rather than `hex' now.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 1 May 2017 00:38:30 +0000 (01:38 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 3 May 2017 18:37:48 +0000 (19:37 +0100)
The reason `%x' used not to work is the recently-fixed bug whereby
conversions to `int' raised exceptions rather than returning `long'.

catacomb/__init__.py

index 4c225e7ab2645f52b79d8b657c1b39d84e33f370..43d74d9a7bd7612d0ef1028a38b61b19d6e966ac 100644 (file)
@@ -229,7 +229,7 @@ class _tmp:
 _augment(PrimeField, _tmp)
 
 class _tmp:
-  def __repr__(me): return '%s(%sL)' % (type(me).__name__, hex(me.p))
+  def __repr__(me): return '%s(%#xL)' % (type(me).__name__, me.p)
   def ec(me, a, b): return ECBinProjCurve(me, a, b)
 _augment(BinField, _tmp)