[Python-Dev] [Python-checkins] r45505 - python/trunk/Modules/posixmodule.c (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Wed Apr 19 00:33:04 CEST 2006


skip at pobox.com wrote:

Martin> Also, I suggest to use None as the return value for "no value Martin> available"; it might be that the configured value is an empty Martin> string (in which case confstr returns 1).

I'll work on all of this. Are you sure you want the API to change?

Wrt. to the "no configured value" case? If everybody can agree it is the conceptually right thing to do (*), then sure; documentation should get updated, of course (if there is any). This was so broken already that I'm not worried about breaking some user's code: all users apparently only ever used the "successful" cases.

OTOH, if people debate whether this actually is the right thing to do, it should not change.

Regards, Martin

(*) I believe it is conceptually right, because it allows to distinguish two cases which are currently indistinguishable in Python but distinguishable in C, namely: a) there is no configured value (confstr returns 0 an does not change errno), and b) the configured value is an empty string (confstr returns 1).



More information about the Python-Dev mailing list