[pypy-svn] r48624 - pypy/branch/more-unicode-improvements/pypy/module/_codecs

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Nov 13 00:10:08 CET 2007


Author: cfbolz
Date: Tue Nov 13 00:10:08 2007
New Revision: 48624

Modified:
   pypy/branch/more-unicode-improvements/pypy/module/_codecs/interp_codecs.py
Log:
a sanity check


Modified: pypy/branch/more-unicode-improvements/pypy/module/_codecs/interp_codecs.py
==============================================================================
--- pypy/branch/more-unicode-improvements/pypy/module/_codecs/interp_codecs.py	(original)
+++ pypy/branch/more-unicode-improvements/pypy/module/_codecs/interp_codecs.py	Tue Nov 13 00:10:08 2007
@@ -200,6 +200,7 @@
 
 def make_encoder_wrapper(name):
     rname = "unicode_encode_%s" % (name.replace("_encode", ""), )
+    assert hasattr(runicode, rname)
     def wrap_encoder(space, uni, errors="strict"):
         state = space.fromcache(CodecState)
         func = getattr(runicode, rname)
@@ -210,6 +211,7 @@
 
 def make_decoder_wrapper(name):
     rname = "str_decode_%s" % (name.replace("_decode", ""), )
+    assert hasattr(runicode, rname)
     def wrap_decoder(space, string, errors="strict", w_final=True):
         final = space.is_true(w_final)
         state = space.fromcache(CodecState)



More information about the Pypy-commit mailing list