@@ -47,14 +47,7 @@ def __getitem__(self, i):
4747
4848class 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
6558class 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
7372class 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 ):
0 commit comments