This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ronaldoussoren, scoder, serhiy.storchaka
Date 2019-02-10.15:51:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549813904.26.0.516511903572.issue35460@roundup.psfhosted.org>
In-reply-to
Content
There are more reasons to implement in C than just speed ;-). In my code I have two usecases for using PyDict_GetItemString, both not in performance critical code

1) Look up a hardcoded name in a dictionary. These could be switched to the Id API if that were public (and I might implement something like the Id API myself). 

2) Look up a name that is passed in as a "char*" from C code that's outside of my control.  This is a real use case for a PyDict_GetItemString API and not easilty converted to another API.

In PyObjC the majority of calls to PyDict_GetItemString are in the first category, while most of the latter would probably be better of using a PyDict_GetItemBytes API.  Although I definitely to not propose to add such an API to CPython.
History
Date User Action Args
2019-02-10 15:51:45ronaldoussorensetrecipients: + ronaldoussoren, scoder, serhiy.storchaka
2019-02-10 15:51:44ronaldoussorensetmessageid: <1549813904.26.0.516511903572.issue35460@roundup.psfhosted.org>
2019-02-10 15:51:44ronaldoussorenlinkissue35460 messages
2019-02-10 15:51:44ronaldoussorencreate