On Mon, Aug 24, 2020 at 11:10 AM Ricky Teachey <ri...@teachey.org> wrote:

> \The interpreter wouldn't. I'm talking about adding this knowledge of
> signature dependent semantics to `type`.
>
> To implement this, under the hood `type` would detect the signatures with
> different semantics, and choose to wrap the functions with those
> signatures in a closure based on the intended semantic meaning. Then
> everything proceeds as it does today.
>

but it would still not know that:

t = (1,2,3)
something[t]

is the same as:

something[1,2,3]

would it?



> All of this is possible today, of course, using a metaclass, or using a
> regular class and the __init_subclass__ method, or using decorators. But my
> suggestion is to roll it into type.
>
> ---
> Ricky.
>
> "I've never met a Kentucky man who wasn't either thinking about going home
> or actually going home." - Happy Chandler
>
>
>

-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Q6O4JTEHD2S3P5DBHKEET4E5A2NF6YND/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to