ThirdParty/Pygments/pygments/formatter.py

branch
Py2 comp.
changeset 3079
0233bbe9a9c4
parent 2525
8b507a9a2d40
child 3145
a9de05d4a22f
--- a/ThirdParty/Pygments/pygments/formatter.py	Wed Nov 06 19:50:24 2013 +0100
+++ b/ThirdParty/Pygments/pygments/formatter.py	Wed Nov 13 23:30:59 2013 +0100
@@ -11,6 +11,11 @@
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
 
+try:
+    basestring    # __IGNORE_WARNING__
+except NameError:
+    basestring = str
+
 import codecs
 
 from pygments.util import get_bool_opt
@@ -20,7 +25,7 @@
 
 
 def _lookup_style(style):
-    if isinstance(style, str):
+    if isinstance(style, basestring):
         return get_style_by_name(style)
     return style
 

eric ide

mercurial