[Python-Dev] PEP 362: 4th edition (original) (raw)
Victor Stinner victor.stinner at gmail.com
Fri Jun 15 22:48:42 CEST 2012
- Previous message: [Python-Dev] PEP 362: 4th edition
- Next message: [Python-Dev] PEP 362: 4th edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
1. Should we keep 'Parameter.implemented' or not. Please vote
It looks like only few functions of the os module will use it. Even for the os module, I'm not convinced that it is the appropriate solution to indicate if a feature is supported or not. I would prefer something like os.path.supports_unicode_filename, hasattr(os, 'fork'), or something else.
And such attribute might only be useful if changes proposed in the issue #14626 are accepted, but the issue is still open and not everybody do agree on the idea...
- If the object has a
_signature_
attribute and if it is notNone
- return a deepcopy of it
I still disagree with the deepcopy. I read somewhere that Python developers are consenting adult. If someone really want to modify a Signature, it would be nice to provide a simple method to copy it. But I don't see why it should be copied by default. I expect that modifying a signature is more rare than just reading a signature.
- If it is
None
and the object is an instance ofBuiltinFunction
, raise aValueError
Would it be possible to only create a signature for builtin the first time that you read its signature attribute? I don't know how to implement such behaviour on a builtin function. I don't know if it's important to decide this right now.
I don't want to create a signature at startup if it is not used, because it would waste memory (as docstrings? :-)). Or we might drop signature if python -O is used?
Victor
- Previous message: [Python-Dev] PEP 362: 4th edition
- Next message: [Python-Dev] PEP 362: 4th edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]