Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: rdict-fast-hash
Changeset: r93366:6a993ce073f5
Date: 2017-12-11 17:37 +0100
http://bitbucket.org/pypy/pypy/changeset/6a993ce073f5/

Log:    explain what the arguments mean

diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -749,6 +749,13 @@
         return {}
 
     def __init__(self, key_eq, key_hash, force_non_null=False, 
fast_hash=False):
+        """ force_non_null=True means that the key can never be None (even if
+        the annotator things it could be)
+
+        fast_hash=True means that the hash function is very fast, meaning it's
+        efficient enough that the dict does not have to store the hash per key.
+        It also implies that neither the hash nor the eq function will mutate
+        the dictionary. """
         self._dict = self._newdict()
         self.key_eq = key_eq
         self.key_hash = key_hash
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to