X-Received: by 10.50.112.232 with SMTP id it8mr9403716igb.9.1457343830948; Mon, 07 Mar 2016 01:43:50 -0800 (PST) X-Received: by 10.50.102.106 with SMTP id fn10mr175964igb.5.1457343830927; Mon, 07 Mar 2016 01:43:50 -0800 (PST) Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!hb3no12137394igb.0!news-out.google.com!pn7ni2740igb.0!nntp.google.com!hb3no12137389igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Mon, 7 Mar 2016 01:43:50 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=188.201.19.227; posting-account=sqtteQoAAAALnEiItJFqX1r3rla9k7yQ NNTP-Posting-Host: 188.201.19.227 References: <241aeea9-2604-4fa4-bf06-822ba5be143b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Struggeling with collections From: Faling Dutchman Injection-Date: Mon, 07 Mar 2016 09:43:50 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:104201 Op maandag 7 maart 2016 10:31:48 UTC+1 schreef Jussi Piitulainen: > Faling Dutchman writes: > > I am just starting off in python, but have good knowledge of both Java > > and C#. Now is the problem that I need to have multiple instances of > ... > > it prints: <__main__.Item object at 0x02EBF3B0> > > > > So that is not usefull to me. There can be an infinite amount of > ... > > and it has to show all the parameters of the class Item and not say > > "ive got an object at this memory address, have a nice day" > Others have now told you that your class has a special method that > defines the string representation of instances. What you are seeing is > the default. You can specify your own. > I just want to add that Java does it the same way. Surely this hasn't > changed? (I've never known C#, so no comment on that.) At least, I've never encountered it, but well, the __dict__ is very usefull, as I said, I'm verry new to python, but I love programming in it. I hope to get way better in it as I am now :)