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 c8458ce commit 8edc5cbCopy full SHA for 8edc5cb
utils/gyb.py
@@ -710,8 +710,10 @@ def execute(self, context):
710
# If we got a result, the code was an expression, so append
711
# its value
712
if result is not None and result != '':
713
+ from numbers import Number, Integral
714
+ result_string = repr(result) if isinstance(result, Number) and not isinstance(result, Integral) else str(result)
715
context.append_text(
- str(result), self.filename, self.start_line_number)
716
+ result_string, self.filename, self.start_line_number)
717
718
def __str__(self, indent=''):
719
source_lines = re.sub(r'^\n', '', strip_trailing_nl(
0 commit comments