瀏覽代碼

Merge pull request #39429 from Calinou/doc-dictionary-hash-order

Mention ordering caveats for `Dictionary.hash()`
Rémi Verschelde 5 年之前
父節點
當前提交
60db9f906c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      doc/classes/Dictionary.xml

+ 1 - 0
doc/classes/Dictionary.xml

@@ -148,6 +148,7 @@
 				# The line below prints `true`, whereas it would have printed `false` if both variables were compared directly.
 				# The line below prints `true`, whereas it would have printed `false` if both variables were compared directly.
 				print(dict1.hash() == dict2.hash())
 				print(dict1.hash() == dict2.hash())
 				[/codeblock]
 				[/codeblock]
+				[b]Note:[/b] Dictionaries with the same keys/values but in a different order will have a different hash.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="keys">
 		<method name="keys">