class My_meta(type):
def hello(cls):
print("hey")
class Just_a_class(metaclass=My_meta):
pass
a = Just_a_class()
a.hello()
Above code is giving:
AttributeError: 'Just_a_class' object has no attribute 'hello'
Please suggest the changes to make it work. Thanks.
Just_a_classwill have that method?