Re: Can't seem to start on this

Discussion in 'Python' started by Kene Meniru, Jan 3, 2013.

  1. Kene Meniru

    Kene Meniru Guest

    Mitya Sirenef wrote:

    >
    > I'm not familiar with POV-Ray. I want to note that with python standard
    > style, class names look like this: ClassName, instances look like this:
    > instance_name; it sounds like you want LMark to be an instance? Or you
    > want instances in A to use class naming style?
    >


    Think of "A" as an extension of the user interface. I want to make the
    user's life as easy as possible and in this case, part of that is to write
    as few text as possible. Using the abbreviated LMark is laziness on my part.
    I wanted to differentiate the boundary class LinearMark, which the user will
    type in "A" from the entity class LMark which will have the actual data
    about a linear mark object. LMark is actually called LinearMarkData.

    > Second, is the LMark instance only used to perform one set of actions?
    > If that's the case, you can have users instantiate it in A and the
    > __init__ method will do the set of actions you need -- this will be just
    > as easy for the user as the alternative.
    >
    > -m
    >


    So far this is working for me. I am not sure if you mean something
    different. I have a command in "A" like:

    Site("New Site", borderNum) # Creates a building site object in "B"

    In "B", the Site class (which is a subclass of the main class that
    coordinates the creation of the entire building) receives this call,
    processes the parameters with any required calculations and calls another
    class called SiteData (from module "C") which generates the object called
    "New Site" with the number of boundaries provided. Site then stores SiteData
    in a dictionary provided in its super class. The super class coordinates the
    creation of the entire building so all objects can interact with the
    properties of the objects in the dictionary (of building components).

    So in effect no instantiation is performed in "A". The user calls classes in
    "B" with the appropriate parameters to create the building components which
    are then created and stored for later access by other components.

    --

    Kene
    ::::::::::::::::::
    Kene Meniru, 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:
    172
    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:
    175
    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. Mitya Sirenef

    Re: Can't seem to start on this

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

    Re: Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    160
    Kene Meniru
    Jan 3, 2013
Loading...

Share This Page