[Checkins] SVN: Sandbox/malthe/chameleon.core/ Changed two isinstance checks to check for basestring instead of str or unicode.
Hanno Schlichting
plone at hannosch.info
Wed Nov 19 14:30:04 EST 2008
Log message for revision 93145:
Changed two isinstance checks to check for basestring instead of str or unicode.
Changed:
U Sandbox/malthe/chameleon.core/CHANGES.txt
U Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py
-=-
Modified: Sandbox/malthe/chameleon.core/CHANGES.txt
===================================================================
--- Sandbox/malthe/chameleon.core/CHANGES.txt 2008-11-19 17:21:43 UTC (rev 93144)
+++ Sandbox/malthe/chameleon.core/CHANGES.txt 2008-11-19 19:30:04 UTC (rev 93145)
@@ -4,6 +4,9 @@
HEAD
~~~~
+- Changed two isinstance checks to check for basestring instead of str or
+ unicode. [hannosch]
+
1.0b9 (released 19/11/2008)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py
===================================================================
--- Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py 2008-11-19 17:21:43 UTC (rev 93144)
+++ Sandbox/malthe/chameleon.core/src/chameleon/core/generation.py 2008-11-19 19:30:04 UTC (rev 93145)
@@ -46,7 +46,7 @@
if default is None:
default = unicode(msgid)
- if not isinstance(default, (str, unicode)):
+ if not isinstance(default, basestring):
return default
return interpolate(default, mapping)
@@ -196,7 +196,7 @@
"""Coerces variable to unicode (actually ``str``, because it's
much faster)."""
- self.write("if not isinstance(%s, (str, unicode)):" % variable)
+ self.write("if not isinstance(%s, basestring):" % variable)
self.indent()
self.write("%s = str(%s)" % (variable, variable))
self.outdent()
More information about the Checkins
mailing list