Re: Can't seem to start on this

Discussion in 'Python' started by Mitya Sirenef, Jan 3, 2013.

  1. 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/
    Mitya Sirenef, Jan 3, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kene Meniru

    Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    171
    Kene Meniru
    Jan 3, 2013
  2. Mitya Sirenef

    Re: Can't seem to start on this

    Mitya Sirenef, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    173
    Mitya Sirenef
    Jan 3, 2013
  3. Kene Meniru

    Re: Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    126
    Kene Meniru
    Jan 3, 2013
  4. Kene Meniru

    Re: Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    159
    Kene Meniru
    Jan 3, 2013
  5. D'Arcy J.M. Cain

    Re: Can't seem to start on this

    D'Arcy J.M. Cain, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    162
    D'Arcy J.M. Cain
    Jan 3, 2013
Loading...

Share This Page