We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67f04c1 commit 3d155ccCopy full SHA for 3d155cc
doc/sphinxext/ipython_directive.py
@@ -134,8 +134,10 @@
134
135
if PY3:
136
from io import StringIO
137
+ text_type = str
138
else:
139
from StringIO import StringIO
140
+ text_type = unicode
141
142
#-----------------------------------------------------------------------------
143
# Globals
@@ -255,8 +257,7 @@ def set_encodings(self, encodings):
255
257
self.encodings = encodings
256
258
259
def write(self,data):
- #py 3 compat here
- if isinstance(data,unicode):
260
+ if isinstance(data, text_type):
261
return super(DecodingStringIO, self).write(data)
262
263
for enc in self.encodings:
0 commit comments