let me begin with that I am as green as it gets when it comes to programming but have been making process. My mind however still needs to fully understand why and what is ha
This is a very easy answer, surprised you never got a response! :(
You have not actually created an object yet.
For instance, you would want to write:
first = classname()
instead of just
first = classname
At the moment, how you wrote it, first
is pointing to a class. E.g., if you ask what first
is, you'd get:
However, after instantiating it (by simply adding the ()
at the end), you'd see that first
is now:
<__main__.classname object at 0x101cfa3c8>
The important distinction here is that your call created a class, whereas mine created an object.
A class is to an object as humankind is to you, or as canine is to Lassie.
You created "canine", whereas you wanted to create "Lassie".
Note: you also usually want to initialize your objects. For that, you place an __init__
method in your class.