creating and naming objects
bnblazer at gmail.com
Wed Jun 7 19:07:52 CEST 2006
Thank you all for your response. I think that I am getting it. Based
on those responses, would I be correct in thinking that this would be
the way to initialize my Student object and return the values?
def __init__(self, name, id):
self.name = name
self.id = id
Additionally, correct me if I am wrong but I can recycle:
foo = Student()
And doing so will just create a new instance of Student (with whatever
attributes it is given) and the original foo is gone?
Thanks for your help and patience. After reading my original post and
then this one, I could see that it may look suspiciously like a home
work assignment. Trust me it's not. The student example just seemed
like a good fit to discuss this.
More information about the Python-list