I made the following simple class in Visual studio community edition:
class Check(object):
def __init__(self):
self.t = 5
but when run
from Check import Check
try:
print(Check.t)
except Exception as Err:
print(str(Err))
or
import Check
try:
print(Check.t)
except Exception as Err:
print(str(Err))
I get the error of:
The object 'Check' has no attribute 't'
It is also weird because the keyword 'self' is not shown as Python keyword or Buildin func.