@@ -43,8 +43,8 @@ def db(t, p):
43
43
def cyclic (length = None , alphabet = string .ascii_lowercase , n = None ):
44
44
"""cyclic(length = None, alphabet = string.ascii_lowercase, n = 4) -> list/str
45
45
46
- A simple wrapper over :func:`de_bruijn`. This function returns a
47
- at most `length` elements.
46
+ A simple wrapper over :func:`de_bruijn`. This function returns at most
47
+ `length` elements.
48
48
49
49
If the given alphabet is a string, a string is returned from this function. Otherwise
50
50
a list is returned.
@@ -93,8 +93,8 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
93
93
https://www.sciencedirect.com/science/article/pii/S0012365X00001175
94
94
95
95
Arguments:
96
- subseq: The subsequence to look for. This can either be a string, a list
97
- or an integer. If an integer is provided it will be packed as a
96
+ subseq: The subsequence to look for. This can be a string, a list or an
97
+ integer. If an integer is provided it will be packed as a
98
98
little endian integer.
99
99
alphabet: List or string to generate the sequence over.
100
100
n(int): The length of subsequences that should be unique.
@@ -125,7 +125,7 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
125
125
return _gen_find (subseq , de_bruijn (alphabet , n ))
126
126
127
127
def _gen_find (subseq , generator ):
128
- """Returns the first position of subseq in the generator or -1 if there is no such position."""
128
+ """Returns the first position of ` subseq` in the generator or -1 if there is no such position."""
129
129
subseq = list (subseq )
130
130
pos = 0
131
131
saved = []
0 commit comments