diff --git a/python-temel/staticmethod.alternative.py b/python-temel/staticmethod.alternative.py new file mode 100644 index 0000000..3179934 --- /dev/null +++ b/python-temel/staticmethod.alternative.py @@ -0,0 +1,7 @@ +class Sample: + def foo(): # bu nasıl metot? + print('foo') + +Sample.foo() # geçerli +s = Sample() +#s.foo() # error! diff --git a/python-temel/staticmethod.alternative.py~ b/python-temel/staticmethod.alternative.py~ new file mode 100644 index 0000000..c3adb37 --- /dev/null +++ b/python-temel/staticmethod.alternative.py~ @@ -0,0 +1,7 @@ +class Sample: + def foo(): # bu nasıl metot? + print('foo') + +Sample.foo() # geçerli +s = Sample() +s.foo() # error!