On Sat, Feb 15, 2020 at 9:25 AM Soni L. <fakedme...@gmail.com> wrote:
> the function explicitly calls the trait method on the object:
>
>    obj = Baz();
>    Bar(obj).x()  # or Baz.Bar.x(obj) if you know the name under which
> the trait impl is located and wanna use it rather than making a wrapper
> trait object.

And this is the bit where I ask again: What is your proposal and how
is it different from just having an object with that collection of
methods, since all the trait methods apply only to their own trait's
data anyway? In other words, how is this different from perfectly
ordinary object composition?

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/4YNA3S23BJS7YKQBQICK5MGRPSJQBVDA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to