Re: [Tutor] class Knights vs class Knights(object)

2009-11-07 Thread Patrick Sabin
Wayne Werner wrote: and my question is what is the difference between the two? Is there a difference other than one is an object the other is an instance? I googled "python object vs. instance" and didn't find anything terribly useful. Yes there is a difference. One class inherits from objec

[Tutor] class Knights vs class Knights(object)

2009-11-07 Thread Wayne Werner
Hi, For class definitions I've always used class Knights: but I've just seen an example using: class Knights(object): So I did a quick little test and see this: >>> a = Knights() >>> b = Knights2() >>> a <__main__.Knights instance at 0xb7e12bec> >>> b <__main__.Knights2 object at 0xb7e12b2c>