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: Anonymous 2010-01-06 21:24

>>24

With all your fan mail I'm surprised you're so touchy. Anyway, my problem had nothing to do with man pages so that doesn't even make any sense.  Do _you_ know what a man page is? And I'm aware that programming is heavily abstract. I guess I'm just too simple to know about all that fancy philosophy and stuff you get with your stanford phd. I'm a simple guy.  I code.  I want to code better.  That's all.  That you get so upset over a simple question really says a lot about the value of all the stuff you know.  Stuff "I'll never be able to comprehend".

And I don't feel bad for bringing a programming question to prog.  That so many keystrokes are wasted on flaming me for being a learner should make you stop and think though.

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