On Thu, Apr 27, 2017 at 6:24 AM, Erik <pyt...@lucidity.plus.com> wrote: > The background is that what I find myself doing a lot of for private > projects is importing data from databases into a structured collection of > objects and then grouping and analyzing the data in different ways before > graphing the results. > > So yes, I tend to have classes that accept their entire object state as > parameters to the __init__ method (from the database values) and then any > other methods in the class are generally to do with the subsequent analysis > (including dunder methods for iteration, rendering and comparison etc).
You may want to try designing your objects as namedtuples. That gives you a lot of what you're looking for. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/