I'm new at Python and I'm trying to do something and hope you can help me:
If I'm defining a class at Python like: class foo:
, and inside the class I want to do something with "foo" object, i.e. - I want that one of the objects of the class will be something like a=foo()
.
So, it should look like:
class foo:
def __init__(self):
self.t=7
a=foo() #it's outside init....
It is possible?
There is a way to do it?
(I'm trying to do this and it's always give me errors...)
(I tried to do import
to the file but it doesn't help at all...)
Thank you!