[Python-Dev] PEP 362: 4th edition (original) (raw)

Steven D'Aprano steve at pearwood.info
Tue Jun 19 03:50:49 CEST 2012


On Mon, Jun 18, 2012 at 07:10:33PM -0400, Yury Selivanov wrote:

It seems that we have the following options for 'signature(obj)':

1. If 'obj' has a 'signature' attribute - return a copy of it, if not - create a new one. 2. If 'obj' has a 'signature' attribute - return it, if not - create a new one. 3. Same as '2', but Signature is also immutable.

There's a slight ambiguity there. Do you mean, create a signature attribute, or just create a new Signature instance?

I presume you mean the later, a Signature instance, and not cache it in signature.

-- Steven



More information about the Python-Dev mailing list