[Python-Dev] PEP 362 Third Revision (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Fri Jun 15 05:41:47 CEST 2012
- Previous message: [Python-Dev] PEP 362 Third Revision
- Next message: [Python-Dev] PEP 362 Third Revision
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jun 15, 2012 at 1:20 PM, Benjamin Peterson <benjamin at python.org> wrote:
2012/6/14 Larry Hastings <larry at hastings.org>:
Also, it's more granular than that. For example, Python now understands symbolic links on Windows--but only haphazardly at best. The "followsymlinks" argument works on Windows for os.stat() but not for os.chmod(). Then indeed it's more granular than a parameter being "implemented" or not. A parameter may have a more restricted or extended meaning on different operating systems. (sendfile() on files for example).
I agree with Benjamin here: I'd like to leave the flag out for now. I can see there could be a legitimate use case for something like that, but:
- Context-specific function annotations may be a better answer
- Context-specific "info" containers (such as sys.flags, sys.int_info, sys.float_info, time.get_clock_info) may be a better answer
- A multi-valued attribute or an arbitrary string attribute (parameter docstrings, anyone?) may be a better answer
There's no need to enshrine a flag for a currently ill-defined concept in the initial version of the API. If it still seems like a good idea by the time 3.4 rolls around, then we can add it than as a new attribute on inspect.Parameter objects
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] PEP 362 Third Revision
- Next message: [Python-Dev] PEP 362 Third Revision
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]