Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update docstring for new load() and dump() functions

  • Loading branch information...
commit 646aa35290f72bb5ef4b4d7f38292736b43f79db 1 parent 268d8fd
Ryan Kelly authored

Showing 2 changed files with 6 additions and 14 deletions. Show diff stats Hide diff stats

  1. +3 7 README.rst
  2. +3 7 tnetstring/__init__.py
10 README.rst
Source Rendered
@@ -19,22 +19,18 @@ Here's the integer 12345 encoded as a tnetstring::
19 19
20 20 5:12345#
21 21
22   -And here's a list mixing integers and bools::
  22 +And here's the list [12345,True,0] which mixes integers and bools::
23 23
24 24 19:5:12345#4:true!1:0#]
25 25
26 26 Simple enough? This module gives you the following functions:
27 27
  28 + :dump: dump an object as a tnetstring to a file
28 29 :dumps: dump an object as a tnetstring to a string
  30 + :load: load a tnetstring-encoded object from a file
29 31 :loads: load a tnetstring-encoded object from a string
30 32 :pop: pop a tnetstring-encoded object from the front of a string
31 33
32   -
33   -When I get around to it, I will also add the following:
34   -
35   - :dump: dump an object as a tnetstring to a file
36   - :load: load a tnetstring-encoded object from a file
37   -
38 34 Note that since parsing a tnetstring requires reading all the data into memory
39 35 at once, there's no efficiency gain from using the file-based versions of these
40 36 functions. They're only here so you can use load() to read precisely one
10 tnetstring/__init__.py
@@ -19,22 +19,18 @@
19 19
20 20 5:12345#
21 21
22   -And here's a list mixing integers and bools::
  22 +And here's the list [12345,True,0] which mixes integers and bools::
23 23
24 24 19:5:12345#4:true!1:0#]
25 25
26 26 Simple enough? This module gives you the following functions:
27 27
  28 + :dump: dump an object as a tnetstring to a file
28 29 :dumps: dump an object as a tnetstring to a string
  30 + :load: load a tnetstring-encoded object from a file
29 31 :loads: load a tnetstring-encoded object from a string
30 32 :pop: pop a tnetstring-encoded object from the front of a string
31 33
32   -
33   -When I get around to it, I will also add the following:
34   -
35   - :dump: dump an object as a tnetstring to a file
36   - :load: load a tnetstring-encoded object from a file
37   -
38 34 Note that since parsing a tnetstring requires reading all the data into memory
39 35 at once, there's no efficiency gain from using the file-based versions of these
40 36 functions. They're only here so you can use load() to read precisely one

0 comments on commit 646aa35

Please sign in to comment.
Something went wrong with that request. Please try again.