@@ -116,9 +116,7 @@ class PermSpace(sequence_tools.CuteSequenceMixin, collections.Sequence,
116116
117117 @classmethod
118118 def coerce (cls , argument ):
119- '''
120- Make `argument` into something of class `cls`, if it isn't already.
121- '''
119+ '''Make `argument` into something of class `cls` if it isn't.'''
122120 if isinstance (argument , PermSpace ):
123121 return argument
124122 else :
@@ -366,7 +364,10 @@ def _undapplied_unrapplied_fixed_map(self):
366364 else :
367365 return self .fixed_map
368366
369- _just_fixed = caching .CachedProperty (lambda self : self ._get_just_fixed ())
367+ _just_fixed = caching .CachedProperty (
368+ lambda self : self ._get_just_fixed (),
369+ """A version of this perm space without any variations except fixed."""
370+ )
370371
371372 def _get_just_fixed (self ):
372373 # This gets overridden in `__init__`.
@@ -501,7 +502,8 @@ def __getitem__(self, i):
501502
502503
503504 n_unused_elements = caching .CachedProperty (
504- lambda self : self .sequence_length - self .n_elements
505+ lambda self : self .sequence_length - self .n_elements ,
506+ '''In partial perm spaces, number of elements that aren't used.'''
505507 )
506508
507509 __iter__ = lambda self : (self [i ] for i in
@@ -606,7 +608,7 @@ def index(self, perm):
606608
607609 short_length_string = caching .CachedProperty (
608610 lambda self : misc .get_short_factorial_string (self .sequence_length ),
609- doc = 'Short string describing size of space, e.g. "12!"'
611+ doc = ''' Short string describing size of space, e.g. "12!"'' '
610612 )
611613
612614 undapplied = caching .CachedProperty (
@@ -615,7 +617,7 @@ def index(self, perm):
615617 degrees = self .degrees , slice_ = self .canonical_slice ,
616618 n_elements = self .n_elements , is_combination = self .is_combination
617619 ),
618- doc = 'A version of this `PermSpace` without a custom domain.'
620+ doc = ''' A version of this `PermSpace` without a custom domain.'' '
619621 )
620622 unrapplied = caching .CachedProperty (
621623 lambda self : PermSpace (
@@ -625,7 +627,7 @@ def index(self, perm):
625627 degrees = self .degrees , slice_ = self .canonical_slice ,
626628 n_elements = self .n_elements , is_combination = self .is_combination
627629 ),
628- doc = 'A version of this `PermSpace` without a custom range.'
630+ doc = ''' A version of this `PermSpace` without a custom range.'' '
629631 )
630632 @caching .CachedProperty
631633 def unpartialled (self ):
@@ -656,16 +658,16 @@ def unpartialled(self):
656658 n_elements = self .n_elements , is_combination = self .is_combination ,
657659 degrees = self .degrees , slice_ = None
658660 ),
659- doc = 'An unsliced version of this `PermSpace`.'
661+ doc = ''' An unsliced version of this `PermSpace`.'' '
660662 )
661663 purified = caching .CachedProperty (
662664 lambda self : PermSpace (len (self .sequence )),
663- doc = 'An purified version of this `PermSpace`.'
665+ doc = ''' An purified version of this `PermSpace`.'' '
664666 )
665667 _just_dapplied_rapplied = caching .CachedProperty (
666668 lambda self : self .purified .get_dapplied (self .domain ). \
667669 get_rapplied (self .sequence ),
668- doc = 'Purified, but dapplied and rapplied, version of this `PermSpace`. '
670+ doc = '''This perm space purified but dapplied and rapplied.'' '
669671 )
670672
671673 @caching .CachedProperty
@@ -724,11 +726,9 @@ def get_partialled(self, n_elements):
724726 )
725727
726728
727-
728-
729729 @caching .CachedProperty
730730 def undegreed (self ):
731- '''Get an undegreed version of this `PermSpace`.'''
731+ '''An undegreed version of this `PermSpace`.'''
732732 if self .is_sliced :
733733 raise Exception ("Can't be used on sliced perm spaces. Try "
734734 "`perm_space.unsliced.undegreed`." )
@@ -849,19 +849,18 @@ def fixed_indices(self):
849849 free_indices = caching .CachedProperty (
850850 lambda self : tuple (item for item in range (self .sequence_length )
851851 if item not in self ._undapplied_fixed_map .keys ()),
852- doc = 'Integer indices of items that can change between permutations. '
852+ doc = ''' Integer indices of free items.'' '
853853 )
854854 free_keys = caching .CachedProperty (
855855 lambda self : tuple (item for item in self .domain
856856 if item not in self .fixed_map .keys ()),
857- doc = 'Indices (possibly from domain) of items that can change between '
858- 'permutations.'
857+ doc = '''Indices (possibly from domain) of free items.'''
859858
860859 )
861860 free_values = caching .CachedProperty (
862861 lambda self : tuple (item for item in self .sequence
863862 if item not in self .fixed_map .values ()),
864- doc = 'Items that can change between permutations.'
863+ doc = ''' Items that can change between permutations.'' '
865864 )
866865
867866
0 commit comments