Skip to content

Commit

Permalink
Fix typos in cyclic.py's docstrings (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsteven authored and zachriggle committed Oct 18, 2016
1 parent fd73115 commit 67e11a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pwnlib/util/cyclic.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def db(t, p):
def cyclic(length = None, alphabet = string.ascii_lowercase, n = None):
"""cyclic(length = None, alphabet = string.ascii_lowercase, n = 4) -> list/str
A simple wrapper over :func:`de_bruijn`. This function returns a
at most `length` elements.
A simple wrapper over :func:`de_bruijn`. This function returns at most
`length` elements.
If the given alphabet is a string, a string is returned from this function. Otherwise
a list is returned.
Expand Down Expand Up @@ -93,8 +93,8 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
https://www.sciencedirect.com/science/article/pii/S0012365X00001175
Arguments:
subseq: The subsequence to look for. This can either be a string, a list
or an integer. If an integer is provided it will be packed as a
subseq: The subsequence to look for. This can be a string, a list or an
integer. If an integer is provided it will be packed as a
little endian integer.
alphabet: List or string to generate the sequence over.
n(int): The length of subsequences that should be unique.
Expand Down Expand Up @@ -125,7 +125,7 @@ def cyclic_find(subseq, alphabet = string.ascii_lowercase, n = None):
return _gen_find(subseq, de_bruijn(alphabet, n))

def _gen_find(subseq, generator):
"""Returns the first position of subseq in the generator or -1 if there is no such position."""
"""Returns the first position of `subseq` in the generator or -1 if there is no such position."""
subseq = list(subseq)
pos = 0
saved = []
Expand Down

0 comments on commit 67e11a9

Please sign in to comment.