On 6/5/2016 2:55 AM, Mark Summerfield wrote:
Sometimes I want to spread a class over multiple files.
My experience with trying to work with two do-all classes in idlelib has
engendered a dislike for such. It is hard to find things in a
kitchen-sink class. To switch IDLE from being a multi-w
On Sun, 5 Jun 2016 06:14 pm, Mark Summerfield wrote:
> You're quite right! For some reason I have a blind-spot about mixins, but
> they are the perfect solution. Thanks:-)
They really aren't :-)
Just yesterday on an unrelated thread I linked to a long discussion about
multiple inheritance, mixin
You're quite right! For some reason I have a blind-spot about mixins, but they
are the perfect solution. Thanks:-)
--
https://mail.python.org/mailman/listinfo/python-list
Mark Summerfield wrote:
> Sometimes I want to spread a class over multiple files.
>
> My primary use case is when I create a "Model" class to reflect an entire
> SQL database. I want a model instance to provide a single point of access
> to
> the database, but the database has many tables each r
On 06/04/2016 11:55 PM, Mark Summerfield wrote:
Sometimes I want to spread a class over multiple files.
There’s and easy way to do this in Python using what's called a Mixin
class and (multiple) inheritance:
(See https://en.wikipedia.org/wiki/Mixin for more information.)
In one file, say e
Sometimes I want to spread a class over multiple files.
My primary use case is when I create a "Model" class to reflect an entire SQL
database. I want a model instance to provide a single point of access to
the database, but the database has many tables each requiring its own methods
since they