Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

python classes

Name: Anonymous 2010-01-05 23:50

OK, say I need to create an application that simulates a
family tree.  Each member may have a mom dad and kids.

I need to create a family tree class that contains a
collection of these member class objects and methods for
adding branches, removing members, etc...

I'm mainly having a hard time figuring how to join the
members if that makes sense.

I've got something like...

class member(object):
   
    def __init__(self):
       member.kid = self[0]
       member.dad = self[1]
       etc...


class familyTree(object):

    def __init___(self):
        for m in mlist:
            try:
                m = member(m)

blah blah blah


How to I make the familytree class contain a
collection of member class objects?

Name: BBCoder 2010-01-06 16:23

>>11 Why don't you listen?

>> This is not how you quote.

>This is now how you god damn quote either.

> Put a [m]>[/m] at the beginning of the line, [b]followed by a space[/b] and then the quote text.
Put a > at the beginning of the line, followed by a space and then the quote text.

And just because I hate when people don't know how to multi-line quote, I'll tell you how to do that too.

> Put it at the end of a line like so: [o]
And then continue the quote on the next line.  You don't need another >.
You must close the tag at the end. [/o]
Put it at the end of a line like so:
And then continue the quote on the next line.  You don't need another >.
You must close each tag at the end.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List