Skip to content

Commit cc421ae

Browse files
committed
-
1 parent 4c6cfac commit cc421ae

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

source_py3/python_toolbox/logic_tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def get_equivalence_classes(iterable, key=None, container=set,
7272
7373
>>> get_equivalence_classes(range(10), lambda x: x % 3)
7474
{0: {0, 9, 3, 6}, 1: {1, 4, 7}, 2: {8, 2, 5}}
75-
{2: {1, 'meow'}, 4: {3}}
7675
7776
7877
Returns a `dict` with keys being the results of the function, and the

source_py3/python_toolbox/misc_tools/overridable_property.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@
88

99
class OverridableProperty(OwnNameDiscoveringDescriptor):
1010
'''
11-
blocktododoc
11+
A property which may be overridden.
12+
13+
This behaves exactly like the built-in `property`, except if you want to
14+
manually override the value of the property, you can. Example:
15+
16+
>>> class Thing:
17+
... cat = OverridableProperty(lambda self: 'meow')
18+
...
19+
>>> thing = Thing()
20+
>>> thing.cat
21+
'meow'
22+
>>> thing.cat = 'bark'
23+
>>> thing.cat
24+
'bark'
25+
1226
'''
1327

1428
def __init__(self, fget, doc=None, name=None):
15-
'''
16-
blocktododoc Construct the `ProxyProperty`.
17-
18-
`attribute_name` is the name of the attribute that we will proxy,
19-
prefixed with a dot, like '.whatever'.
20-
21-
You may also refer to a nested attribute of the object rather than a
22-
direct one; for example, you can do
23-
`ProxyProperty('.whatever.x.height')` and it will access the `.height`
24-
attribute of the `.x` attribute of `.whatever`.
25-
26-
You may specify a docstring as `doc`.
27-
'''
2829
OwnNameDiscoveringDescriptor.__init__(self, name=name)
2930
self.getter = fget
3031
self.__doc__ = doc

source_py3/python_toolbox/nifty_collections/various_ordered_sets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ def sort(self, key=None, reverse=False):
146146

147147

148148
def discard(self, key):
149-
"""
149+
'''
150150
Remove an element from a set if it is a member.
151151
152152
If the element is not a member, do nothing.
153-
"""
153+
'''
154154
if key in self._map:
155155
key, prev, next = self._map.pop(key)
156156
prev[NEXT] = next

0 commit comments

Comments
 (0)