Serdar Tumgoren wrote:
Thanks to you both for the suggestions. I think I'll try the approach
below. But just one follow-up: should I be setting "self.tablename",
or is a static attribute ("tablename") the correct approach?
A nice way to do this is with a class attribute. For example:
class C
> ..The atttribute is created in the class definition
> (not in any method) as just "tablename". This creates an attribute of
> the class, rather than of the instance. It is accessed as
> "self.tablename". The attribute lookup rules will look first in the
> instance, fail to find 'tablename', then
On Tue, Aug 18, 2009 at 3:16 PM, Serdar Tumgoren wrote:
> On Tue, Aug 18, 2009 at 2:51 PM, Serdar Tumgoren wrote:
>> Thanks to you both for the suggestions. I think I'll try the approach
>> below. But just one follow-up: should I be setting "self.tablename",
>> or is a static attribute ("tablename"
On Tue, Aug 18, 2009 at 2:51 PM, Serdar Tumgoren wrote:
> Thanks to you both for the suggestions. I think I'll try the approach
> below. But just one follow-up: should I be setting "self.tablename",
> or is a static attribute ("tablename") the correct approach?
>
Looks like it's the former (i.e. "s
Thanks to you both for the suggestions. I think I'll try the approach
below. But just one follow-up: should I be setting "self.tablename",
or is a static attribute ("tablename") the correct approach?
> A nice way to do this is with a class attribute. For example:
> class Committee(object):
>
> d
On Tue, Aug 18, 2009 at 1:47 PM, Serdar Tumgoren wrote:
> Hi all,
>
> I've hit another gray area for an application I'm working on.
> Specifically, I have a campaign Committee object, and then subclasses
> called CandidateCommittee and PresidentialCommittee. Depending on the
> type of committee, I
Hi all,
I've hit another gray area for an application I'm working on.
Specifically, I have a campaign Committee object, and then subclasses
called CandidateCommittee and PresidentialCommittee. Depending on the
type of committee, I have to execute a series of SQL statements to
pull data (used to po