[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Alex Gaynor
Alex Gaynor added the comment: Would it be reasonable to develop a Python API for this? If C functions have a need to do this, surely Python code does as well. -- nosy: +alex ___ Python tracker ___

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Is there any benefit in making them public API functions? Originally, I was going to suggest them as internal functions, but the variety of use cases in the standard library suggested that third-party C extensions would benefit as well. Since this isn'

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is there any benefit in making them public API functions? -- nosy: +pitrou ___ Python tracker ___ __

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file34668/double_counter_hash.py ___ Python tracker ___ ___ Python-bugs-list

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Raymond Hettinger
New submission from Raymond Hettinger: Propose adding two functions, PyDict_GetItem_KnownHash() and PyDict_SetItem_KnownHash(). It is reasonably common to make two successive dictionary accesses with the same key. This results in calling the hash function twice to compute the same result. F

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file34667/applied_known_hash.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue21101] Extend the PyDict C API to handle cases where the hash value in known

2014-03-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- components: Interpreter Core files: known_hash.diff keywords: patch nosy: rhettinger priority: normal severity: normal stage: patch review status: open title: Extend the PyDict C API to handle cases where the hash value in known type: enhancement version