[pypy-svn] r8727 - pypy/dist/pypy/module
ac at codespeak.net
ac at codespeak.net
Sat Jan 29 17:11:18 CET 2005
Author: ac
Date: Sat Jan 29 17:11:18 2005
New Revision: 8727
Modified:
pypy/dist/pypy/module/__builtin__module.py
Log:
Improve implementation of unichr()
Modified: pypy/dist/pypy/module/__builtin__module.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__module.py (original)
+++ pypy/dist/pypy/module/__builtin__module.py Sat Jan 29 17:11:18 2005
@@ -439,7 +439,7 @@
print "You must be joking."
def unichr(code):
- return (chr((code >> 24) & 0xff) + chr((code >> 16) & 0xff)+ chr((code >> 8) &0xff) + chr(code & 0xff)).decode('ucs-4')
+ return unicode('\\U%08x' %(code), 'unicode-escape')
# ______________________________________________________________________
#
# Interpreter-level function definitions
More information about the Pypy-commit
mailing list