Skip to content

Commit

Permalink
Fix documentation formatting for pwnlib.util.packing.flat (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
meithecatte committed Jul 4, 2020
1 parent d2b0a59 commit ca06098
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pwnlib/util/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,10 @@ def flat(*args, **kwargs):
Dictionary keys give offsets at which to place the corresponding values
(which are recursively flattened). Offsets are relative to where the
flattened dictionary occurs in the output (i.e. `{0: 'foo'}` is equivalent
to `'foo'`). Offsets can be integers, unicode strings or regular strings.
flattened dictionary occurs in the output (i.e. ``{0: 'foo'}`` is equivalent
to ``'foo'``). Offsets can be integers, unicode strings or regular strings.
Integer offsets >= ``2**(word_size-8)`` are converted to a string using
`:func:pack`. Unicode strings are UTF-8 encoded. After these conversions
:func:`pack`. Unicode strings are UTF-8 encoded. After these conversions
offsets are either integers or strings. In the latter case, the offset will
be the lowest index at which the string occurs in `filler`. See examples
below.
Expand Down Expand Up @@ -837,16 +837,16 @@ def dd(dst, src, count = 0, skip = 0, seek = 0, truncate = False):
The seek offset of file objects will be preserved.
Arguments:
dst: Supported types are `:class:file`, `:class:list`, `:class:tuple`,
`:class:str`, `:class:bytearray` and `:class:unicode`.
dst: Supported types are :class:`file`, :class:`list`, :class:`tuple`,
:class:`str`, :class:`bytearray` and :class:`unicode`.
src: An iterable of byte values (characters or integers), a unicode
string or a file object.
count (int): How many bytes to copy. If `count` is 0 or larger than
``len(src[seek:])``, all bytes until the end of `src` are
copied.
skip (int): Offset in `dst` to copy to.
seek (int): Offset in `src` to copy from.
truncate (bool): If `:const:True`, `dst` is truncated at the last copied
truncate (bool): If :const:`True`, `dst` is truncated at the last copied
byte.
Returns:
Expand Down

0 comments on commit ca06098

Please sign in to comment.