From 76a020b50c94d053ea005b819199c882381e9474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Thu, 3 Aug 2023 23:47:57 +0300 Subject: [PATCH] static method alternative --- python-temel/staticmethod.alternative.py | 7 +++++++ python-temel/staticmethod.alternative.py~ | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 python-temel/staticmethod.alternative.py create mode 100644 python-temel/staticmethod.alternative.py~ 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!