Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36036

Re: Can't seem to start on this

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <msirenef@lightbird.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'args': 0.04; '"c"': 0.07; 'method,': 0.07; 'users,': 0.07; 'python': 0.09; '"a"': 0.09; 'instances.': 0.09; 'python:': 0.09; 'passing': 0.15; 'instances,': 0.16; 'instantiate': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:start': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'module': 0.19; 'do.': 0.21; 'properties': 0.24; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'separate': 0.27; 'interface': 0.27; 'class': 0.29; 'classes': 0.30; 'file': 0.32; 'instances': 0.33; 'to:addr:python-list': 0.33; 'compared': 0.35; 'described': 0.35; 'so,': 0.35; "won't": 0.35; 'but': 0.36; 'method': 0.36; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'your': 0.60; 'kind': 0.61; 'provide': 0.62; 'different': 0.63; 'subject:this': 0.84; 'have?': 0.84
Date Thu, 03 Jan 2013 00:49:33 -0500
From Mitya Sirenef <msirenef@lightbird.net>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject Re: Can't seem to start on this
References <kc31l4$27v$1@ger.gmane.org> <50E50D08.201@lightbird.net> <kc3553$pn7$1@ger.gmane.org>
In-Reply-To <kc3553$pn7$1@ger.gmane.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.19.1357192178.2939.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1357192178 news.xs4all.nl 6990 [2001:888:2000:d::a6]:55858
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:36036

Show key headers only | View raw


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 
user
 > just concentrates on using the classes as illustrated. snap_size is a 
global
 > setting. LinearMark is a class in module "C" described as LMark but 
with the
 > 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?

  - mitya



-- 
Lark's Tongue Guide to Python: http://lightbird.net/larks/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Can't seem to start on this Mitya Sirenef <msirenef@lightbird.net> - 2013-01-03 00:49 -0500

csiph-web