summaryrefslogtreecommitdiffstats
path: root/foo.py
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2020-09-13 16:49:33 -0500
committerKyle K <kylek389@gmail.com>2020-09-13 16:49:33 -0500
commit40de87995b901f72a4dd1f394af3c20c24c73541 (patch)
treed73614d825f53152b60239779309e0002f6d3283 /foo.py
parenta3d3368d9f024052632dc87b5d52e26a223c7869 (diff)
downloadPythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.gz
PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.bz2
PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.zip
small class exmaple with a global variable
Diffstat (limited to 'foo.py')
-rw-r--r--foo.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/foo.py b/foo.py
new file mode 100644
index 0000000..823d1f7
--- /dev/null
+++ b/foo.py
@@ -0,0 +1,10 @@
+class Foo:
+ pass
+def hello():
+ print('hello, world')
+x = 13
+
+class Square():
+ def __init__(self, x):
+ self.inital = x
+ self.squared = x**2