Re: Amateur question on class definitions...

2011-11-29 Thread Ian Kelly
On Tue, Nov 29, 2011 at 8:21 AM, J. Marc Edwards wrote: > So I am defining my Python classes for a Django data model.  I have a the > following class hierarchy and would value some expert input on how to best > implement this. > > I have many instances of a particular class which I call a "workflo

Re: Amateur question on class definitions...

2011-11-29 Thread Chris Angelico
On Wed, Nov 30, 2011 at 2:21 AM, J. Marc Edwards wrote: >     ...a list of "a_workflows", i.e. a composite workflow, should I use this > syntax? >     set_of_workflows = list(a_workflow) > This would be usual: set_of_workflows = [a_workflow] Using the list() constructor directly is for when you

Amateur question on class definitions...

2011-11-29 Thread J. Marc Edwards
So I am defining my Python classes for a Django data model. I have a the following class hierarchy and would value some expert input on how to best implement this. I have many instances of a particular class which I call a "workflow", e.g. wf_1, wf_2, wf_3, etc. These class instances of workflows