greg wrote: > > Yes, but it would by possible to use snprintf in PyErr_Format. >=20 > 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...) in an earlier post, I suggested adding a couple of PyErr_Format- specific formatting codes: possibly stupid idea: would it make sense to add custom formatting codes, like: %S =3D> char*, string, clip if excessively long %T =3D> PyObject*, show name of type, clip if excessively long where "clip" means: truncate at 80 characters, and add "..." to indicate that the string was truncated. this covers most of the places where %.\d+s are used (in the Python core, at least...) comments? </F>
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