Kristján V. Jónsson wrote: > One thing I have often lamented having in PyString_FromFormat (and > cousins, like PyErr_Format) is to be able to integrate PyObject > pointers. Adding something like %S and %R (for str() and repr() > respectively) seems very useful to me. Is there any reason why this > isn´t there? Not sure what the specific use case is, but I think I would use PyString_Format instead, and use everything you can use in a % operator. If you want to avoid explicit argument tuple building, you can also write static PyObject *fmt = NULL; if (!fmt) fmt = PyString_FromString("Foo %s bar %s foobar %d"); res = PyMethod_Call(fmt, "__mod__", "(OOi)", o1, o2, 42); Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4