mailr3121 - /1.3/data/pipe_container.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 08, 2007 - 08:01:
Author: bugman
Date: Thu Mar  8 08:00:29 2007
New Revision: 3121

URL: http://svn.gna.org/viewcvs/relax?rev=3121&view=rev
Log:
Updated the __repr__ method of the PipeContainer object.


Modified:
    1.3/data/pipe_container.py

Modified: 1.3/data/pipe_container.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/pipe_container.py?rev=3121&r1=3120&r2=3121&view=diff
==============================================================================
--- 1.3/data/pipe_container.py (original)
+++ 1.3/data/pipe_container.py Thu Mar  8 08:00:29 2007
@@ -60,10 +60,22 @@
 
 
     def __repr__(self):
-        text = "The data class containing all permanent program data.\n"
-        text = text + "The class contains the following objects:\n"
+        """The string representation of the object.
+
+        Rather than using the standard Python conventions (either the string 
representation of the
+        value or the "<...desc...>" notation), a rich-formatted description 
of the object is given.
+        """
+
+        # Intro text.
+        text = "The data pipe storage object.\n"
+
+        # Objects.
+        text = text + "\n"
+        text = text + "Objects:\n"
         for name in dir(self):
             if match("^_", name):
                 continue
-            text = text + "  " + name + ", " + `type(getattr(self, name))` + 
"\n"
+            text = text + "  " + name + ": " + `getattr(self, name)` + "\n"
+
+        # Return the text representation.
         return text




Related Messages


Powered by MHonArc, Updated Thu Mar 08 08:40:05 2007