David Watson <bai...@users.sourceforge.net> added the comment: > If I understood correctly, you don't want the value to be truncated if the > variable grows between the two calls to confstr(). Which behaviour would you > expect? A Python exception?
A return size larger than the buffer is *supposed* to indicate that the current value is larger than the supplied buffer, so I would just expect it to reallocate the buffer, call confstr() again and return the new value, unless it was known that such a situation indicated an actual problem. In other words, I would not expect it to do anything special. I didn't write the original patch the way I did in order to fix this (potential) bug - it just seemed like the most natural way to write the code. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9647> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com