Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hnbq$q36$1...@blaine.gmane.org... "Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... > > If you are saying - > for item in list: > print(item) > > you can say instead - > for item in list: > print(str(item)) >

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:o5hlh4$1sb$1...@blaine.gmane.org... If you are saying - for item in list: print(item) you can say instead - for item in list: print(str(item)) This is not correct, sorry. print(item) will automatically print the string representat

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Frank Millman
"David D" wrote in message news:4f0680eb-2678-4ea2-b622-a6cd5a19e...@googlegroups.com... I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run > the code, it

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Erik
Hi, On 15/01/17 19:58, David D wrote: I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run the code, it does exactly what I want, it returns the __str__ informa

Re: working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread Chris Angelico
On Mon, Jan 16, 2017 at 6:58 AM, David D wrote: > I am creating a parent class and a child class. I am inheriting from the > parent with an additional attribute in the child class. I am using __str__ > to return the information. When I run the code, it does exactly what I want, > it returns

working with classes, inheritance, _str_ returns and a list

2017-01-15 Thread David D
I am creating a parent class and a child class. I am inheriting from the parent with an additional attribute in the child class. I am using __str__ to return the information. When I run the code, it does exactly what I want, it returns the __str__ information. This all works great. BUT 1)

Re: Working with classes

2012-12-04 Thread Jean-Michel Pichavant
- Original Message - > Hello, I've been working on this program for a long time but can't > seem to get it to work.. The first array is the input file, then a > class, another class and the actual program. Could anyone see what > is wrong? I'm sorry if the program doesn't make any sense at

Re: Working with classes

2012-12-03 Thread Chris Angelico
On Tue, Dec 4, 2012 at 9:47 AM, wrote: > Hello, I've been working on this program for a long time but can't seem to > get it to work.. The first array is the input file, then a class, another > class and the actual program. Could anyone see what is wrong? I'm sorry if > the program doesn't mak

Re: Working with classes

2012-12-03 Thread Rhodri James
On Mon, 03 Dec 2012 22:47:53 -, wrote: Hello, I've been working on this program for a long time but can't seem to get it to work. I'm sorry, you are going to have to be a lot clearer. It isn't even a little bit obvious what you are talking about, which rather makes me suspect this is a

Working with classes

2012-12-03 Thread laila
Hello, I've been working on this program for a long time but can't seem to get it to work.. The first array is the input file, then a class, another class and the actual program. Could anyone see what is wrong? I'm sorry if the program doesn't make any sense at all I'm just starting to learn th