Accepted and assigned back to Thomas.
Guido approved of this "in theory" before, so go for it! I would like to see the function renamed to _PyOS_GetOpt(), because we always stick "OS" in the name of an OS substitute function, and the leading underscore keeps it out of the public API (thus answering one of your open issues: if people clamor for a public getopt replacement, we can add that later; but if we make it public from the start, it can never go away).
About the license, we can't change it, but it certainly allows us to modify the code and distribute your changes. Under copyright law, I don't believe the changes are substantial enough that we could legitimately claim a new copyright for the new version. So the whole license thing seems a non-issue to me.
Documentation? If it's in the private API, it doesn't need any <wink>.
fprintf(stderr, ...)? Sure. Python barely exists by the time this code is called, and there's really nothing better to do (note that Py_Main calls fprintf(stderr, ...) itself later in a couple of other startup error cases).
|