类不可以直接打属性吗

问题遇到的现象和发生背景python idle
问题相关代码,请勿粘贴截图

class User():
def init(self, first_name, last_name, others):
self.first_name = first_name
self.last_name = last_name
self.others = others
self.login_attempts = 0

def describe_user(self):
    print("This is the basic information: "
          + self.first_name)

def greet_user(self):
    print("Hello, " + self.first_name + self.last_name +
          "\nyour information is " + self.others)

def increment_login_attempts(self):
    self.login_attempts += 1
    return self.login_attempts

def reset_login_attempts(self):
    self.login_attempts = 0

U1 = User('Liu', 'Bw','eerdos')

print("Now, the number is " + str(U1.increment_login_attempts()))

U1.increment_login_attempts()
print(self.login_attempts)

运行结果及报错内容 显示最后一句print里的内容self没有定义
我的解答思路和尝试过的方法 为什么不能直接打属性呢
我想要达到的结果
class User(object):
    def __init__(self, first_name, last_name, others):
        self.first_name = first_name
        self.last_name = last_name
        self.others = others
        self.login_attempts = 0

    def describe_user(self):
        print("This is the basic information: "
              + self.first_name)

    def greet_user(self):
        print("Hello, " + self.first_name + self.last_name +
              "\nyour information is " + self.others)

    def increment_login_attempts(self):
        self.login_attempts += 1
        return self.login_attempts

    def reset_login_attempts(self):
        self.login_attempts = 0


if __name__ == '__main__':
    U1 = User('Liu', 'Bw', 'eerdos')
    print('Now, the number is ' + str(U1.increment_login_attempts()))
    U1.increment_login_attempts()
    # 这里不能用self,要用U1,你实例化的对象是U1,self只在类内部使用,外部使用需要实例化对象.属性或函数(方法)
    print(U1.login_attempts)