Re: Can't seem to start on this
On 01/03/2013 12:32 AM, Kene Meniru wrote:
> Mitya Sirenef wrote:
>> Where is snap_size from? Where is LinearMark from? You don't need to
>> instantiate LinearMark in B, do it in A.
> I want to hide as much of the python syntax from the file "A" so the
> just concentrates on using the classes as illustrated. snap_size is a
> setting. LinearMark is a class in module "C" described as LMark but
> interface class as LinearMark in "B".
Well, that might be ok depending on what you need the instances to do.
Often instantiation provides some kind of customization that makes
instance different from other instances. If you do that for your users,
they won't be able to customize their instances, unless you provide a
separate 'initialize' method, but then it's just as much work for the
users to use that method as compared to passing args on instantiation.
So, how many instances do you want to make.. what kind of different
functionality / properties they will have?
Lark's Tongue Guide to Python: http://lightbird.net/larks/
|All times are GMT. The time now is 12:31 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.