Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: I disagree. This is an old API, a thin wrapper around standard POSIX API, and returning an empty string instead of None will make impossible to distinguish NULL from "".
It is easy to convert None in an empty string in Python: `value or ''`. I would change the test to if field is not None: self.assertIsInstance(field, str) or self.assertIsInstance(field, (str, type(None))) (I prefer the former variant). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32033> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com