[pypy-svn] r45799 - pypy/branch/pypy-more-rtti-inprogress/rlib

arigo at codespeak.net arigo at codespeak.net
Fri Aug 17 10:02:45 CEST 2007


Author: arigo
Date: Fri Aug 17 10:02:44 2007
New Revision: 45799

Modified:
   pypy/branch/pypy-more-rtti-inprogress/rlib/rmarshal.py
Log:
Document the interface.


Modified: pypy/branch/pypy-more-rtti-inprogress/rlib/rmarshal.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/rlib/rmarshal.py	(original)
+++ pypy/branch/pypy-more-rtti-inprogress/rlib/rmarshal.py	Fri Aug 17 10:02:44 2007
@@ -16,6 +16,11 @@
     pass
 
 def get_marshaller(type):
+    """Return a marshaller function.
+    The marshaller takes two arguments: a buffer and an object of
+    type 'type'. The buffer is list of characters that gets extended
+    with new data when the marshaller is called.
+    """
     s_obj = annotation(type, None)
     try:
         # look for a marshaller in the 'dumpers' list
@@ -37,6 +42,11 @@
         return find_loader(s_obj)
 
 def get_unmarshaller(type):
+    """Return an unmarshaller function.
+    The unmarshaller takes a string as argument, and return an object
+    of type 'type'.  It raises ValueError if the marshalled data is
+    invalid or contains an object of a different type.
+    """
     loader = get_loader(type)
     # wrap the loader into a more convenient interface
     try:



More information about the Pypy-commit mailing list