Skip to content
Browse files

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

  • Loading branch information...
1 parent 268d8fd commit 646aa35290f72bb5ef4b4d7f38292736b43f79db @rfk committed Apr 3, 2011
Showing with 6 additions and 14 deletions.
  1. +3 −7 README.rst
  2. +3 −7 tnetstring/__init__.py
View
10 README.rst
@@ -19,22 +19,18 @@ Here's the integer 12345 encoded as a tnetstring::
5:12345#
-And here's a list mixing integers and bools::
+And here's the list [12345,True,0] which mixes integers and bools::
19:5:12345#4:true!1:0#]
Simple enough? This module gives you the following functions:
+ :dump: dump an object as a tnetstring to a file
:dumps: dump an object as a tnetstring to a string
+ :load: load a tnetstring-encoded object from a file
:loads: load a tnetstring-encoded object from a string
:pop: pop a tnetstring-encoded object from the front of a string
-
-When I get around to it, I will also add the following:
-
- :dump: dump an object as a tnetstring to a file
- :load: load a tnetstring-encoded object from a file
-
Note that since parsing a tnetstring requires reading all the data into memory
at once, there's no efficiency gain from using the file-based versions of these
functions. They're only here so you can use load() to read precisely one
View
10 tnetstring/__init__.py
@@ -19,22 +19,18 @@
5:12345#
-And here's a list mixing integers and bools::
+And here's the list [12345,True,0] which mixes integers and bools::
19:5:12345#4:true!1:0#]
Simple enough? This module gives you the following functions:
+ :dump: dump an object as a tnetstring to a file
:dumps: dump an object as a tnetstring to a string
+ :load: load a tnetstring-encoded object from a file
:loads: load a tnetstring-encoded object from a string
:pop: pop a tnetstring-encoded object from the front of a string
-
-When I get around to it, I will also add the following:
-
- :dump: dump an object as a tnetstring to a file
- :load: load a tnetstring-encoded object from a file
-
Note that since parsing a tnetstring requires reading all the data into memory
at once, there's no efficiency gain from using the file-based versions of these
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.