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


Groups > comp.lang.python > #36077 > unrolled thread

Re: Can't seem to start on this

Started byKene Meniru <Kene.Meniru@illom.org>
First post2013-01-03 14:30 -0500
Last post2013-01-03 14:30 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Can't seem to start on this Kene Meniru <Kene.Meniru@illom.org> - 2013-01-03 14:30 -0500

#36077 — Re: Can't seem to start on this

FromKene Meniru <Kene.Meniru@illom.org>
Date2013-01-03 14:30 -0500
SubjectRe: Can't seem to start on this
Message-ID<mailman.55.1357241426.2939.python-list@python.org>
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
::::::::::::::::::
KeMeniru@gmail.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web