dekoratör örneği 2

This commit is contained in:
Mert Gör 🇹🇷 2023-08-04 17:11:57 +03:00
parent ef072b5018
commit b7d46c45a2
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
class Sample:
@staticmethod
def foo():
print('static foo method')

View File

@ -0,0 +1,8 @@
class Sample:
def foo():
print('static foo method')
foo = staticmethod(foo)
Sample.foo()