Skip to content

Commit beec4c6

Browse files
committed
-
1 parent 6ee3a52 commit beec4c6

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

source_py3/python_toolbox/combi/perming/perm.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ def __getitem__(self, i):
4747

4848
class PermAsDictoid(sequence_tools.CuteSequenceMixin, _BasePermView,
4949
collections.Mapping):
50-
'''blocktododoc
51-
A viewer of a perm's items, similar to `dict.items()`.
52-
53-
This is useful for dapplied perms; it lets you view the perm (both index
54-
access and iteration) as a sequence where each item is a 2-tuple, where the
55-
first item is from the domain and the second item is its corresponding item
56-
from the sequence.
57-
'''
50+
'''A dict-like interface to a `Perm`.'''
5851
def __getitem__(self, key):
5952
return self.perm[key]
6053
def __iter__(self):
@@ -63,6 +56,12 @@ def __iter__(self):
6356

6457

6558
class PermType(abc.ABCMeta):
59+
'''
60+
Metaclass for `Perm` and `Comb`.
61+
62+
The functionality provided is: If someone tries to create a `Perm` with a
63+
`CombSpace`, we automatically use `Comb`.
64+
'''
6665
def __call__(cls, item, perm_space=None):
6766
if cls == Perm and isinstance(perm_space, CombSpace):
6867
cls = Comb
@@ -72,6 +71,11 @@ def __call__(cls, item, perm_space=None):
7271
@functools.total_ordering
7372
class Perm(sequence_tools.CuteSequenceMixin, collections.Sequence,
7473
metaclass=PermType):
74+
'''
75+
A permutation.
76+
77+
78+
'''
7579

7680
@classmethod
7781
def coerce(cls, item, perm_space=None):

source_py3/python_toolbox/combi/perming/perm_space.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ class PermSpaceType(abc.ABCMeta):
3333
Metaclass for `PermSpace` and `CombSpace`.
3434
3535
The functionality provided is: If someone tries to instantiate `PermSpace`
36-
while specifying `is_combination=True`, we automatically use `CombSpace`
37-
for him.
36+
while specifying `is_combination=True`, we automatically use `CombSpace`.
3837
'''
3938
def __call__(cls, *args, **kwargs):
4039
if cls == PermSpace and kwargs.get('is_combination', False):

0 commit comments

Comments
 (0)