Fredrik Lundh wrote: > > greg wrote: > > > > Yes, but it would by possible to use snprintf in PyErr_Format. > > > > still not quite the same. /F's PyErr_Format returns an arbitrary length > > string. snprintf() would be cut at some pre-specified limit. > > if I understood GvR correctly, the only remaining issue here > is whether we need more formatting codes > > (PyErr_Format is undocumented, so I'm not sure we need to > be backwards compatible with code outside the interpreter...) > > comments? How about this: You add your new PyErr_Format() replacement with the existing subset of codes, but instead of bailing out when the function sees a format code it doesn't understand, you use sprintf() or snprintf() (where available) to format the unkown code ?! -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
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