[pypy-svn] r47873 - pypy/dist/pypy/lang/smalltalk
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Oct 24 23:58:53 CEST 2007
Author: cfbolz
Date: Wed Oct 24 23:58:52 2007
New Revision: 47873
Modified:
pypy/dist/pypy/lang/smalltalk/model.py
Log:
those two are really nice reprs, so rename the methods
Modified: pypy/dist/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/model.py (original)
+++ pypy/dist/pypy/lang/smalltalk/model.py Wed Oct 24 23:58:52 2007
@@ -34,8 +34,8 @@
def invariant(self):
return isinstance(self.value, int)
- def __str__(self):
- return "SmallInt(%d)" % self.value
+ def __repr__(self):
+ return "W_SmallInteger(%d)" % self.value
class W_Float(W_Object):
def __init__(self, value):
@@ -51,8 +51,8 @@
def invariant(self):
return self.value is not None # XXX but later:
#return isinstance(self.value, float)
- def __str__(self):
- return "Float(%f)" % self.value
+ def __repr__(self):
+ return "W_Float(%f)" % self.value
class W_AbstractObjectWithIdentityHash(W_Object):
#XXX maybe this is too extreme, but it's very random
More information about the Pypy-commit
mailing list