Commit d123e50b authored by matt@zope.com's avatar matt@zope.com

Add unicode methods "unichr" and "unicode" as unrestricted methods. Note

that the issues remain to allowing unicode objects through Zope that are
not addressed herin, but are related to type('') not equalling type(u''); much
special case code exists that handles strings differently that needs
review to handle unicode as well.
parent 8df1f88d
...@@ -191,6 +191,15 @@ functions: DTML Functions ...@@ -191,6 +191,15 @@ functions: DTML Functions
default is given, the default is returned. If no condition is true default is given, the default is returned. If no condition is true
and there is no default, None is returned. and there is no default, None is returned.
unichr(number) -- Return a unicode string representing the value of
number as a unicode character. This is the inverse of ord() for
unicode characters.
unicode(string[, encoding[, errors ] ]) -- Decodes string using the
codec for encoding. Error handling is done according to errors. The
default behavior is to decode UTF-8 in strict mode, meaning that
encoding errors raise ValueError.
Attributes Attributes
None -- The 'None' object is equivalent to the Python built-in object None -- The 'None' object is equivalent to the Python built-in object
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
from __future__ import nested_scopes from __future__ import nested_scopes
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
import new import new
...@@ -93,6 +93,7 @@ for name in ('None', 'abs', 'chr', 'divmod', 'float', 'hash', 'hex', 'int', ...@@ -93,6 +93,7 @@ for name in ('None', 'abs', 'chr', 'divmod', 'float', 'hash', 'hex', 'int',
'len', 'max', 'min', 'oct', 'ord', 'round', 'str', 'pow', 'len', 'max', 'min', 'oct', 'ord', 'round', 'str', 'pow',
'apply', 'callable', 'cmp', 'complex', 'isinstance', 'apply', 'callable', 'cmp', 'complex', 'isinstance',
'issubclass', 'long', 'repr', 'range', 'list', 'tuple', 'issubclass', 'long', 'repr', 'range', 'list', 'tuple',
'unichr', 'unicode',
'Exception', 'Exception',
'ArithmeticError', 'AssertionError', 'AttributeError', 'ArithmeticError', 'AssertionError', 'AttributeError',
'EOFError', 'EnvironmentError', 'FloatingPointError', 'EOFError', 'EnvironmentError', 'FloatingPointError',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment