From: <pj...@us...> - 2009-04-03 01:01:39
|
Revision: 6150 http://jython.svn.sourceforge.net/jython/?rev=6150&view=rev Author: pjenvey Date: 2009-04-03 01:01:25 +0000 (Fri, 03 Apr 2009) Log Message: ----------- give stats a repr Modified Paths: -------------- trunk/jython/Lib/os.py Modified: trunk/jython/Lib/os.py =================================================================== --- trunk/jython/Lib/os.py 2009-04-03 00:52:31 UTC (rev 6149) +++ trunk/jython/Lib/os.py 2009-04-03 01:01:25 UTC (rev 6150) @@ -198,7 +198,7 @@ def __init__(self, results): if len(results) != 10: - raise TypeError("stat_result() takes an a 10-sequence") + raise TypeError("stat_result() takes an a 10-sequence") for (name, index) in stat_result._stat_members: self.__dict__[name] = results[index] @@ -234,6 +234,10 @@ return 1 return cmp(self.__dict__, other.__dict__) + def __repr__(self): + return repr(tuple(self.__dict__[member[0]] for member + in stat_result._stat_members)) + error = OSError def _exit(n=0): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |