forked from tdwojak/Python2017
21 lines
403 B
Python
21 lines
403 B
Python
#!/usr/bin/env python2
|
|
# -*- coding: utf-8 -*-
|
|
|
|
class Employee:
|
|
id_prac = 1
|
|
def __init__ (self,imie, nazwisko):
|
|
self.imie = imie
|
|
self.nazwisko = nazwisko
|
|
self.id_prac = Employee.id_prac
|
|
Employee.id_prac += 1
|
|
def get_id (self):
|
|
return self.id_prac
|
|
|
|
|
|
prac1 = Employee("X1","Y1")
|
|
prac2 = Employee("X2","Y2")
|
|
|
|
print(prac1.get_id())
|
|
print(prac2.get_id())
|
|
|