[tor-commits] [stem/master] Header documentation for ControlLine class

atagar at torproject.org atagar at torproject.org
Sun Nov 6 00:20:59 UTC 2011


commit aba675c3f565aee7f1855215e90b1d7af26a1ce8
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Nov 5 13:56:13 2011 -0700

    Header documentation for ControlLine class
---
 stem/types.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/stem/types.py b/stem/types.py
index 2e1ac91..b9c21ad 100644
--- a/stem/types.py
+++ b/stem/types.py
@@ -10,7 +10,15 @@ ControlMessage - Message from the control socket.
   |- content - provides the parsed message content
   |- raw_content - unparsed socket data
   |- __str__ - content stripped of protocol formatting
-  +- __iter__ - message components stripped of protocol formatting
+  +- __iter__ - ControlLine entries for the content of the message
+
+ControlLine - String subclass with methods for parsing controller responses.
+  |- remainder - provides the unparsed content
+  |- is_empty - checks if the remaining content is empty
+  |- is_next_quoted - checks if the next entry is a quoted value
+  |- is_next_mapping - checks if the next entry is a KEY=VALUE mapping
+  |- pop - removes and returns the next entry
+  +- pop_mapping - removes and returns the next entry as a KEY=VALUE mapping
 
 Version - Tor versioning information.
   |- __str__ - string representation





More information about the tor-commits mailing list