Skip to content

Commit

Permalink
advanced docs updated: small example
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski committed Feb 8, 2021
1 parent 71d671f commit 130e39f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff'

Some numerical classes are implemented using `struct` module, others use BytesInteger field.

>>> FormatField("<","l").build(1)
b'\x01\x00\x00\x00'
>>> BytesInteger(4, swapped=True).build(1)
>>> d = FormatField("<","l") or BytesInteger(4, swapped=True)
>>> d.build(1)
b'\x01\x00\x00\x00'


Expand Down

0 comments on commit 130e39f

Please sign in to comment.