瀏覽代碼

maint: `put_table()` copy user data

wangweimin 4 年之前
父節點
當前提交
45d8b9a099
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      pywebio/output.py

+ 2 - 0
pywebio/output.py

@@ -420,6 +420,8 @@ def put_table(tdata, header=None, scope=Scope.Current, position=OutputPosition.B
             for row in tdata
             for row in tdata
         ]
         ]
         header = header_
         header = header_
+    else:
+        tdata = [list(i) for i in tdata]  # copy data
 
 
     if header:
     if header:
         tdata = [header, *tdata]
         tdata = [header, *tdata]