Hi, <div><br></div><div>For class definitions I've always used</div><div><br></div><div>class Knights:</div><div><br></div><div>but I've just seen an example using:</div><div><br></div><div>class Knights(object):</div>
<div><br></div><div>So I did a quick little test and see this:</div><div><br></div><div><div>>>> a = Knights()</div><div>>>> b = Knights2()</div><div>>>> a</div><div><__main__.Knights instance at 0xb7e12bec></div>
<div>>>> b</div><div><__main__.Knights2 object at 0xb7e12b2c></div></div><div><br></div><div>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.</div>
<div><br></div><div>Thanks,</div><div>Wayne<br clear="all"><br>-- <br>To be considered stupid and to be told so is more painful than being called gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness, every vice, has found its defenders, its rhetoric, its ennoblement and exaltation, but stupidity hasn’t. - Primo Levi<br>
</div>