Message335159
| 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:45 | ronaldoussoren | set | recipients:
+ ronaldoussoren, scoder, serhiy.storchaka |
| 2019年02月10日 15:51:44 | ronaldoussoren | set | messageid: <1549813904.26.0.516511903572.issue35460@roundup.psfhosted.org> |
| 2019年02月10日 15:51:44 | ronaldoussoren | link | issue35460 messages |
| 2019年02月10日 15:51:44 | ronaldoussoren | create |
|