summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorIterableTrucks <42210451+IterableTrucks@users.noreply.github.com>2021-07-21 20:13:50 +0800
committerGitHub <noreply@github.com>2021-07-21 14:13:50 +0200
commit880353c0ad9300f2543c1b16548b4f2ab6784183 (patch)
tree61ba75f4198dbc9f556658530670d54b033915f0 /lib
parent6f34829ee5a060300859002fd41f0181c0adf754 (diff)
downloadNim-880353c0ad9300f2543c1b16548b4f2ab6784183.tar.gz
complement notes of two doc strings of tables module (#18527)
* complement notes of two doc strings warning the deprecated  procedure's side effect

* Update lib/pure/collections/tables.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update lib/pure/collections/tables.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: BillyZee <billyzee@localhost.localdomain>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/collections/tables.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index d617e06e4..b845f57cc 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -496,6 +496,8 @@ template tabCellHash(i)  = t.data[i].hcode
 proc del*[A, B](t: var Table[A, B], key: A) =
   ## Deletes `key` from hash table `t`. Does nothing if the key does not exist.
   ##
+  ## .. warning:: If duplicate keys were added, this may need to be called multiple times.
+  ##
   ## See also:
   ## * `pop proc<#pop,Table[A,B],A,B>`_
   ## * `clear proc<#clear,Table[A,B]>`_ to empty the whole table
@@ -514,6 +516,8 @@ proc pop*[A, B](t: var Table[A, B], key: A, val: var B): bool =
   ## mapping of the key. Otherwise, returns `false`, and the `val` is
   ## unchanged.
   ##
+  ## .. warning:: If duplicate keys were added, this may need to be called multiple times.
+  ##
   ## See also:
   ## * `del proc<#del,Table[A,B],A>`_
   ## * `clear proc<#clear,Table[A,B]>`_ to empty the whole table