// OOP
diff --git a/demo.py b/demo.py
index 0d6193e..d2e4a1d 100644
--- a/demo.py
+++ b/demo.py
@@ -49,9 +49,6 @@
# print age
# print city
-
-
-
# my_dict = {
# "name": "ehsan",
# "last_name": "yousefi"
@@ -67,13 +64,13 @@
# even = set([3, 3, "3", 3, 3])
# print(sorted(even))
-
# new test .....
if __name__ == "__main__":
run_custome()
+
# module_name,
# package_name,
# ClassName,
@@ -85,3 +82,53 @@
# instance_var_name,
# function_parameter_name,
# local_var_name
+
+
+def my_other_function(self):
+ print self
+ print "this is my function"
+
+
+# class MyClass:
+# name = ""
+#
+# def __init__(self, name="saber"):
+# self.name = name
+# print "init class ... "
+#
+# def my_function(self):
+# print self
+# print "this is my function"
+# print self.name
+#
+#
+# my_object = MyClass()
+# # my_object.name = "ehsan"
+# my_object.my_function()
+# # my_other_function()
+
+
+class Parent(object):
+ parent_name = ""
+
+ def get_parent_name(self):
+ print self.parent_name
+
+
+class Child(Parent):
+ child_name = ""
+
+ def get_parent_name(self):
+ # super(Child, self).get_parent_name()
+ print "my parent name is not Hamid"
+
+ def get_child_name(self):
+ print self.child_name
+
+
+child = Child()
+print type(child)
+# child.parent_name = "Hamid"
+# child.child_name = "ehsan"
+# child.get_child_name()
+# child.get_parent_name()