Skip to content

Commit

Permalink
Document a wrapper parameter and describe its use case.
Browse files Browse the repository at this point in the history
  • Loading branch information
leovp committed Feb 20, 2017
1 parent cbcbc1e commit 5839180
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ Easily load data, modify it and dump back:
with open('new_appinfo.vdf', 'wb') as f:
appinfo.dump(data, f)

Caution: all formats are parsed into `dict` by default, so the order of data is very likely not the same.
As I'm not sure how Steam and related tools deal with rearranged data, pass an `OrderedDict` class to the `wrapper` parameter if you plan to write data back and use it later:
::

from collection import OrderedDict
data = acf.load(f, wrapper=OrderedDict)
# works with other formats as well

Documentation
-------------

Expand Down

0 comments on commit 5839180

Please sign in to comment.