Commit 42fe5621 authored by Andreas Jung's avatar Andreas Jung

been using isinstance() on wrong type instead of instance

parent 9dcd2cc4
......@@ -87,7 +87,7 @@
"""
__version__ = '$Revision: 1.19 $'[11:-2]
__version__ = '$Revision: 1.20 $'[11:-2]
import string, re
......@@ -631,8 +631,7 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
operandType = type(left)
if operandType is IntType:
left = self[left]
elif isinstance(operandType,StringType) or \
isinstance(operandType,UnicodeType):
elif operandType in (StringType,UnicodeType):
left = self[left]
elif operandType is ListType:
left = self.evaluate(left)
......@@ -640,8 +639,7 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
operandType = type(right)
if operandType is IntType:
right = self[right]
elif isinstance(operandType,StringType) or \
isinstance(operandType,UnicodeType):
elif operandType in (StringType,UnicodeType):
right = self[right]
elif operandType is ListType:
right = self.evaluate(right)
......
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