Explorar o código

put_text covert `content` to str

wangweimin %!s(int64=5) %!d(string=hai) anos
pai
achega
79ad99c461
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pywebio/output.py

+ 1 - 1
pywebio/output.py

@@ -128,7 +128,7 @@ def put_text(text, inline=False, anchor=None, before=None, after=None):
     :param str after: 在给定的锚点之后输出内容
         注意: ``before`` 和 ``after`` 参数不可以同时使用
     """
-    _put_content('text', content=text, inline=inline, anchor=anchor, before=before, after=after)
+    _put_content('text', content=str(text), inline=inline, anchor=anchor, before=before, after=after)
 
 
 def put_html(html, anchor=None, before=None, after=None):