Tim Henderson wrote:
> Hello
>
> I want to creat a program that can inspect a set of classes that i have
> made and spit out a savable version of these classes. To do this I need
> to be able to inspect each class and get all of its instance data as
> well as information about a particular meathod
Thanks to both of you. Now that I know the correct terminology for what
I want to do, I can detirmine the best way to do it. I am not sure if
meta-classing is the simplist solution to this problem, however it can
be the most elegant. When I have a final implimintation of this project
it will be pos
> > I have no idea how to do the inspection part of this little
> > problem. I could just have each class define its own meathod to
> > convert to this format, but that would be a lot of work when i
> > could just make one class that solves the problem for all classes.
> > Is there a way to do this
"Tim Henderson" <[EMAIL PROTECTED]> wrote:
> Hello
>
> I want to creat a program that can inspect a set of classes that i
have
> made and spit out a savable version of these classes. To do this I
need
> to be able to inspect each class and get all of its instance data as
> well as information about
Its not obvious what you are asking here. Try inheriting from object:
>>> class song(object):
... def __init__(self, name, artist, album, published):
... self.name = name
... self.artist = artist
... self.album = album
... self.published = published
... def
Hello
I want to creat a program that can inspect a set of classes that i have
made and spit out a savable version of these classes. To do this I need
to be able to inspect each class and get all of its instance data as
well as information about a particular meathod. This is what i want it
to do: