) and age is of type
) and however each of these variables has a property or attribute of
which in most cases we call a magic method in python, this attribute is the class which is instantiated in the creation of variables and in other word it is the type of the variable. so therefore
will return the same data which is
) for the variable
in this case.
is of type
and the type is essentially the class we instantiated initially, so to create a new instance we use the class name and the expected parameters or arguments which will later be the associated type. However classes also have types associated with them.
is of type
which means the type class was instantiated with it's expected parameter which python takes care of to create the class
. Moreover the parameters which the
class takes are
, so lets see how it all works behind the scenes.
and feeds it to the class
clsname, bases and the functions or methods
is actually something that you can customize and modify. Well the question is how do we do that. The way we can modify classes is through inheritance. i.e
we created it had to print out a little info before making the class, which means the class was created through the
we created earlier, so therefore the class above is an example of what is called a META-CLASS.
An alternate way to monitor or supervise what happens in class definition
argument is the class
and we don't want that so we modify that by using the
we created earlier as the argument for
so therefore the class
will be create with the