瀏覽代碼

Help: clarify that list(APPEND) on a non-existent list creates it

This is hinted-at in the introduction, which mentions creating
a new variable value in the current scope, but let's make it
explicit.

Fixes: #22910
Adriaan de Groot 3 年之前
父節點
當前提交
e55f473ea9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Help/command/list.rst

+ 3 - 1
Help/command/list.rst

@@ -128,7 +128,9 @@ Modification
 
   list(APPEND <list> [<element> ...])
 
-Appends elements to the list.
+Appends elements to the list. If no variable named ``<list>`` exists in the
+current scope its value is treated as empty and the elements are appended to
+that empty list.
 
 .. _FILTER: