MCPcopy Create free account
hub / github.com/geekcomputers/Python / Person

Class Person

inheritance_YahV1729.py:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5# In Python 3.x "class Person" is
6# equivalent to "class Person(object)"
7class Person(object):
8 # Constructor
9 def __init__(self, name):
10 self.name = name
11
12 # To get name
13 def getName(self):
14 return self.name
15
16 # To check if this person is employee
17 def isEmployee(self):
18 return False
19
20
21# Inherited or Sub class (Note Person in bracket)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected