Author serhiy.storchaka
Recipients serhiy.storchaka, vstinner, xdegaye
Date 2017-11-15.17:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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)


    self.assertIsInstance(field, (str, type(None)))

(I prefer the former variant).
Date User Action Args
2017-11-15 17:41:29serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, xdegaye
2017-11-15 17:41:29serhiy.storchakasetmessageid: <>
2017-11-15 17:41:29serhiy.storchakalinkissue32033 messages
2017-11-15 17:41:29serhiy.storchakacreate