[pypy-svn] pypy improve-unwrap_spec: Remove dead code
amauryfa
commits-noreply at bitbucket.org
Wed Feb 16 01:16:44 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: improve-unwrap_spec
Changeset: r42012:e2a516b8be5e
Date: 2011-02-16 01:06 +0100
http://bitbucket.org/pypy/pypy/changeset/e2a516b8be5e/
Log: Remove dead code
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -317,21 +317,7 @@
func.__name__: func,
'OperationError': OperationError
}
- if isinstance(cls, str):
- assert 0, "unused?"
- #print "<CHECK", func.__module__ or '?', func.__name__
- assert cls.startswith('<'),"pythontype typecheck should begin with <"
- source = """
- def descr_typecheck_%(name)s(closure, space, w_obj, %(extra)s):
- if not space.is_true(space.isinstance(w_obj, space.w_%(cls_name)s)):
- # xxx improve msg
- msg = "descriptor is for '%(expected)s'"
- raise OperationError(space.w_TypeError, space.wrap(msg))
- return %(name)s(%(closure)s space, w_obj, %(extra)s)
- """
- cls_name = cls[1:]
- expected = repr(cls_name)
- elif cls is None:
+ if cls is None:
source = """
def descr_typecheck_%(name)s(closure, space, w_obj, %(extra)s):
return %(name)s(%(closure)s space, w_obj, %(extra)s)
More information about the Pypy-commit
mailing list