On Wed, Jun 23, 2021 at 6:13 AM Soni L. <fakedme...@gmail.com> wrote:
> Think about it like this, extension methods give you the ability to make
> imported functions that look like this:
>
> foo(bar, baz)
>
> look like this instead:
>
> bar.foo(baz)
>
> That's all there is to them. They're just a lie to change how you
> read/write the code. Some languages have an whole operator that has a
> similar function, where something like bar->foo(baz) is sugar for
> foo(bar, baz). The OP doesn't specify any particular mechanism for
> extension methods, so e.g. making the dot operator be implemented by a
> local function in the module, which delegates to the current attribute
> lookup mechanism by default, would be perfectly acceptable. It's like
> deprecating the existing dot operator and introducing a completely
> different one that has nothing to do with attribute lookup!

uh... I'm lost. Are you saying that that's a good thing? You *want* to
replace the existing dot operator with one that has nothing to do with
attribute lookup?? I don't get it.

ChrisA
_______________________________________________
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/XDY3VAYX3FXJI7ZVT3AYAFA7PGQMBWAA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to