Skip to content

Commit 67e11a9

Browse files
justinstevenzachriggle
authored andcommitted
Fix typos in cyclic.py's docstrings (#775)
1 parent fd73115 commit 67e11a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pwnlib/util/cyclic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def db(t, p):
4343
def cyclic(length = None, alphabet = string.ascii_lowercase, n = None):
4444
"""cyclic(length = None, alphabet = string.ascii_lowercase, n = 4) -> list/str
4545
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.
4848
4949
If the given alphabet is a string, a string is returned from this function. Otherwise
5050
a list is returned.
@@ -93,8 +93,8 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
9393
https://www.sciencedirect.com/science/article/pii/S0012365X00001175
9494
9595
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
9898
little endian integer.
9999
alphabet: List or string to generate the sequence over.
100100
n(int): The length of subsequences that should be unique.
@@ -125,7 +125,7 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
125125
return _gen_find(subseq, de_bruijn(alphabet, n))
126126

127127
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."""
129129
subseq = list(subseq)
130130
pos = 0
131131
saved = []

0 commit comments

Comments
 (0)