[pypy-svn] r7278 - pypy/trunk/src/pypy/annotation
bob at codespeak.net
bob at codespeak.net
Tue Nov 16 12:25:48 CET 2004
Author: bob
Date: Tue Nov 16 12:25:47 2004
New Revision: 7278
Modified:
pypy/trunk/src/pypy/annotation/factory.py
Log:
nicer looking repr for ListFactory and DictFactory
Modified: pypy/trunk/src/pypy/annotation/factory.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/factory.py (original)
+++ pypy/trunk/src/pypy/annotation/factory.py Tue Nov 16 12:25:47 2004
@@ -97,6 +97,9 @@
class ListFactory:
s_item = SomeImpossibleValue()
+ def __repr__(self):
+ return '%s(s_item=%r)' % (self.__class__.__name__, self.s_item)
+
def create(self):
return SomeList(factories = {self: True}, s_item = self.s_item)
@@ -111,6 +114,9 @@
class DictFactory:
items = {}
+ def __repr__(self):
+ return '%s(items=%r)' % (self.__class__.__name__, self.items)
+
def create(self):
return SomeDict(factories = {self: True}, items = self.items)
More information about the Pypy-commit
mailing list