On Fri, Feb 07, 2020 at 10:33:00AM -0600, Nick Timkovich wrote:

> I assume traits are a feature of another language, but not being familiar
> with it can you illustrate its need a bit better? Can you give an example
> in current Python, and how it could be made more clear with the notional
> trait syntax?

A decade ago, Michele Simionato wrote an excellent, highly detailed 
series of blog posts about super, multiple inheritance, mixins and 
traits. A good starting point is this post:

https://www.artima.com/weblogs/viewpost.jsp?thread=246488

Traits are a more restrictive (and therefore safer) version of mixins, 
which are in turn a more restrictive (and therefore safer) version of 
multiple inheritance. See Michele's blog posts for more detail.


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

Reply via email to