v0.1 fastapi: route + model + orm

This commit is contained in:
geeker
2026-09-19 10:41:18 +08:00
commit f4fa2f9714
55 changed files with 3615 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
class Class:
name = 'Class'
def __init__(self, at):
self.attribute = at
def change(self, ano):
self.attribute = ano
self.name = ano
self.__class__.name = ano
def change_obj(self, ano):
self.attribute = ano
self.name = ano
clazz = Class('abc')
print(clazz.name)
# clazz.change('good')
# print(Class.name, clazz.name, clazz.attribute)
clazz.change_obj('good')
print(Class.name, clazz.name, clazz.attribute)