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 c98e515 commit b9118b0Copy full SHA for b9118b0
utils/gyb.py
@@ -15,6 +15,11 @@
15
16
from bisect import bisect
17
18
+try:
19
+ basestring
20
+except NameError:
21
+ basestring = str
22
+
23
24
def get_line_starts(s):
25
"""Return a list containing the start index of each line in s.
@@ -716,7 +721,8 @@ def execute(self, context):
716
721
717
722
# If we got a result, the code was an expression, so append
718
723
# its value
719
- if result is not None and result != '':
724
+ if result is not None \
725
+ or (isinstance(result, basestring) and result != ''):
720
726
from numbers import Number, Integral
727
result_string = None
728
if isinstance(result, Number) and not isinstance(result, Integral):
0 commit comments