[pypy-svn] r40851 - pypy/dist/pypy/module/pypymagic
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Mar 20 18:21:10 CET 2007
Author: cfbolz
Date: Tue Mar 20 18:21:09 2007
New Revision: 40851
Modified:
pypy/dist/pypy/module/pypymagic/interp_magic.py
Log:
docstrings
Modified: pypy/dist/pypy/module/pypymagic/interp_magic.py
==============================================================================
--- pypy/dist/pypy/module/pypymagic/interp_magic.py (original)
+++ pypy/dist/pypy/module/pypymagic/interp_magic.py Tue Mar 20 18:21:09 2007
@@ -6,6 +6,8 @@
return space.wrap('%r' % (w_object,))
def isfake(space, w_obj):
+ """Return whether the argument is faked (stolen from CPython). This is
+ always False after translation."""
if we_are_translated():
return space.w_False
return space.wrap(bool(w_obj.typedef.fakedcpytype))
@@ -19,6 +21,8 @@
pdb.set_trace()
def method_cache_counter(space, name):
+ """Return a tuple (method_cache_hits, method_cache_misses) for calls to
+ methods with the name."""
assert space.config.objspace.std.withmethodcachecounter
ec = space.getexecutioncontext()
return space.newtuple([space.newint(ec.method_cache_hits.get(name, 0)),
@@ -26,6 +30,7 @@
method_cache_counter.unwrap_spec = [ObjSpace, str]
def reset_method_cache_counter(space):
+ """Reset the method cache counter to zero for all method names."""
assert space.config.objspace.std.withmethodcachecounter
ec = space.getexecutioncontext()
ec.method_cache_misses = {}
More information about the Pypy-commit
mailing list