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).
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