summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/tests/class_store.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/basics/tests/class_store.py b/tests/basics/tests/class_store.py
new file mode 100644
index 0000000000..658da451bf
--- /dev/null
+++ b/tests/basics/tests/class_store.py
@@ -0,0 +1,17 @@
+# store to class vs instance
+
+class C:
+ pass
+
+c = C()
+c.x = 1
+print(c.x)
+C.x = 2
+C.y = 3
+print(c.x, c.y)
+print(C.x, C.y)
+print(C().x, C().y)
+c = C()
+print(c.x)
+c.x = 4
+print(c.x)