diff options
-rw-r--r-- | gnunet/__init__.py | 7 | ||||
-rw-r--r-- | gnunet/crypto.py | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/gnunet/__init__.py b/gnunet/__init__.py index 5bae6f0..4ba5bd7 100644 --- a/gnunet/__init__.py +++ b/gnunet/__init__.py | |||
@@ -28,9 +28,10 @@ class _Key: | |||
28 | def __str__(self): | 28 | def __str__(self): |
29 | return strings.data_to_string(self._data) | 29 | return strings.data_to_string(self._data) |
30 | 30 | ||
31 | def __repr__(self): | ||
32 | cls = self.__class__ | ||
33 | return "%s.%s(%r)" % (cls.__module__, cls.__name__, str(self)) | ||
34 | |||
31 | 35 | ||
32 | class HashCode(_Key): | 36 | class HashCode(_Key): |
33 | __bits__ = 512 | 37 | __bits__ = 512 |
34 | |||
35 | def __repr__(self): | ||
36 | return "gnunet.HashCode('" + str(self) + "')" | ||
diff --git a/gnunet/crypto.py b/gnunet/crypto.py index 253f46e..5a82c0d 100644 --- a/gnunet/crypto.py +++ b/gnunet/crypto.py | |||
@@ -4,6 +4,3 @@ import gnunet.strings as strings | |||
4 | 4 | ||
5 | class EcdsaPublicKey(_Key): | 5 | class EcdsaPublicKey(_Key): |
6 | __bits__ = 256 | 6 | __bits__ = 256 |
7 | |||
8 | def __repr__(self): | ||
9 | return "gnunet.crypto.EcdsaPublicKey('" + str(self) + "')" | ||