From 04ab750e229363f4fa909bef8d58bf03b59aaff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Tue, 28 Apr 2020 15:24:45 +0200 Subject: [PATCH] fixed docs for HashableWrapper --- docs/coding/structures.rst | 2 +- satella/__init__.py | 2 +- satella/coding/structures/hashable_objects.py | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/coding/structures.rst b/docs/coding/structures.rst index c7d28ca2..f8245ce6 100644 --- a/docs/coding/structures.rst +++ b/docs/coding/structures.rst @@ -122,7 +122,7 @@ DictionaryView HashableWrapper =============== -.. autofunction:: satella.coding.structures.HashableWrapper +.. autoclass:: satella.coding.structures.HashableWrapper TwoWayDictionary ================ diff --git a/satella/__init__.py b/satella/__init__.py index 19397ba0..23e24119 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.7.16_a1' +__version__ = '2.7.16_a2' diff --git a/satella/coding/structures/hashable_objects.py b/satella/coding/structures/hashable_objects.py index 43e23b32..1d162532 100644 --- a/satella/coding/structures/hashable_objects.py +++ b/satella/coding/structures/hashable_objects.py @@ -9,13 +9,9 @@ class HashableWrapper(Proxy): Use like: - >>> class NotHashable: - >>> def __init__(self, a): - >>> self.a = a - >>> a = HashableWrapper(NotHashable(5)) - >>> assert a.a == 5 - >>> a.a = 4 - >>> assert a.a == 4 + >>> a = {1:2, 3:4} + >>> a = HashableWrapper(a) + >>> hash(a) """ __slots__ = () -- GitLab