Skip to content

Commit be3a161

Browse files
committed
-
1 parent d30448e commit be3a161

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source_py3/python_toolbox/combi/perming/perm_space.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class PermSpace(_VariationRemovingMixin, _VariationAddingMixin,
107107
- Combination: If you pass in `is_combination=True` or use the subclass
108108
`CombSpace`, then you'll have a space of combinations (combs) instead of
109109
perms. Combs are like perms except there's no order to the elements.
110+
- Typed: If you pass in a perm subclass as `perm_type`, you'll get a typed
111+
`PermSpace`, meaning that the perms will use the class you provide
112+
rather than the default `Perm`. This is useful when you want to provide
113+
extra functionality on top of `Perm`.
110114
111115
Note: Some of the options are not allowed to be used with each other.
112116
@@ -328,6 +332,7 @@ def __init__(self, iterable_or_length, n_elements=None, *, domain=None,
328332

329333
### Figuring out perm processor: ######################################
330334
# #
335+
assert issubclass(perm_type, Perm)
331336
self.is_typed = perm_type not in (None, self.default_perm_type)
332337

333338
self.perm_type = perm_type if self.is_typed else self.default_perm_type

0 commit comments

Comments
 (0)