Skip to content

Commit

Permalink
00:09:31
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kashani committed Jul 9, 2018
1 parent 4bfb8b4 commit e74fc1e
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Object-Oriented-Programming/MohammadrezaKasaieSharifi.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Karbordhaye method constructor?
# -------------------------------

from datetime import datetime # Ino man import mikonam ta betoonam ba object datetime kar konam.
# Onject zaman ro mikham azash estefade konam.

class ClassName:
'''
author: Mahdi.
email: mahdi@uga.edu.
'''

# Different methods have different names due to their responsibilities. One of them is constructor which we make an object that method happens!
def __init__(self):
def __init__(self): # Initialize. # This is the constructor method. and as usual we should pass it the self.
self.created = datetime.now()
self.birth =

print('Object is created')



def thisFunctionName(self, name):
print(name) # Har tabe besoorate pishfarz None ro bar migardoone.

if __name__ == '__main__': # Module besurate dasti ejra shode.
obj1 = ClassName() # Making an instance from an object.

print(datetime.now())

0 comments on commit e74fc1e

Please sign in to comment.