[Python-Dev] PEP 362 Third Revision (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Fri Jun 15 09🔞01 CEST 2012


On Fri, Jun 15, 2012 at 3:23 PM, Larry Hastings <larry at hastings.org> wrote:

I disagree with the description "ill-defined".  I would be very surprised indeed if either you or Benjamin genuinely didn't understand exactly what "isimplemented" represents.  If you're suggesting that the documentation is inadequate we can certainly address that.

Perhaps you meant "ill-concieved"?

No, I mean ill-defined. The criteria for when a particular platform should flip that bit for an arbitrary parameter is highly unclear, as whether or not a particular parameter is "implemented" or not depends on the operation and the parameter.

Let's take the "buffering" parameter to the open() builtin. It has three interesting settings:

What counts as "implemented" in that case? Supporting all 3? At least 2? Any 1 of them? If there's a maximum (or minimum) buffer size, does that still count as implemented?

To know what "is_implemented" means for any given parameter, it's going to have to be documented for that parameter. In that case, better to define an interface specific mechanism that lets people ask the questions they want to ask. It's not appropriate to lump it into a general purpose introspection facility (certainly not one that hasn't even been added yet).

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list