[pypy-svn] r41163 - in pypy/dist: demo pypy/lib

hpk at codespeak.net hpk at codespeak.net
Fri Mar 23 13:19:48 CET 2007


Author: hpk
Date: Fri Mar 23 13:19:47 2007
New Revision: 41163

Modified:
   pypy/dist/demo/tp-print-builtin-operation.py
   pypy/dist/pypy/lib/tputil.py
Log:
fix imports, option name


Modified: pypy/dist/demo/tp-print-builtin-operation.py
==============================================================================
--- pypy/dist/demo/tp-print-builtin-operation.py	(original)
+++ pypy/dist/demo/tp-print-builtin-operation.py	Fri Mar 23 13:19:47 2007
@@ -1,7 +1,7 @@
 """
 
 This example transparently intercepts and shows operations on 
-builtin objects.  It requires the "--with-transparent-proxy" option. 
+builtin objects.  Requires the "--objspace-std-withtproxy" option. 
 
 """
 
@@ -9,15 +9,14 @@
 
 def make_show_proxy(instance):
     def controller(operation):
+        print "proxy sees:", operation
         res = operation.delegate()
-        print "proxy sees:", operation, "result=%s" %(res,)
         return res
     tproxy = make_proxy(controller, obj=instance)
     return tproxy
 
 if __name__ == '__main__':
     mydict = make_show_proxy({}) 
-
     assert type(mydict) is dict            # this looks exactly like a dict 
     mydict['hello'] = 'world'              # will print __setitem__
     mydict[42] = 23                        # will print __setitem__

Modified: pypy/dist/pypy/lib/tputil.py
==============================================================================
--- pypy/dist/pypy/lib/tputil.py	(original)
+++ pypy/dist/pypy/lib/tputil.py	Fri Mar 23 13:19:47 2007
@@ -5,7 +5,6 @@
 """
 from __pypy__ import tproxy 
 from types import MethodType
-import inspect
 
 _dummy = object()
 origtype = type



More information about the Pypy-commit mailing list