[Python-Dev] PEP 362 Third Revision
Nick Coghlan
ncoghlan at gmail.com
Fri Jun 15 09:18: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
> "is_implemented" 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:
- unbuffered
- line buffered
- fixed size buffering
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