[pypy-svn] r73840 - pypy/trunk/pypy/interpreter

benjamin at codespeak.net benjamin at codespeak.net
Sat Apr 17 21:13:34 CEST 2010


Author: benjamin
Date: Sat Apr 17 21:13:25 2010
New Revision: 73840

Modified:
   pypy/trunk/pypy/interpreter/baseobjspace.py
Log:
simplify with call_method

Modified: pypy/trunk/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/trunk/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/trunk/pypy/interpreter/baseobjspace.py	Sat Apr 17 21:13:25 2010
@@ -1102,9 +1102,8 @@
         filesystemencoding = space.sys.filesystemencoding
         if (filesystemencoding and
             space.is_true(space.isinstance(w_obj, space.w_unicode))):
-            w_obj = space.call_function(space.getattr(w_obj,
-                                                      space.wrap('encode')),
-                                        space.wrap(filesystemencoding))
+            w_obj = space.call_method(w_obj, "encode",
+                                      space.wrap(filesystemencoding))
         return space.str_w(w_obj)
 
     def bool_w(self, w_obj):



More information about the Pypy-commit mailing list