[Tutor] Link required for difference between class and object

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Nov 17 16:53:49 CET 2013


On 17/11/2013 12:24, Reuben wrote:
> Hi All,
>
> It would be nice if someone could forward a link which explains classes
> and object.
> I am still struggling to understand classes and objects better.
>
> Regards,
> Reuben
>

An extremely simplistic answer to get you going, a class is the template 
that you have in your source code, an object is an instance of your 
class that you create in your source code.

class Myclass(): #the class, the template
     pass

myobject = Myclass() # the instance, the object

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence



More information about the Tutor mailing list