SHARE
TWEET

Untitled

a guest Jun 20th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import datetime
  2.  
  3. class MySQLStore:
  4.  
  5.   def connect(self):
  6.     print('connect to mysql database')
  7.  
  8.   def serialize(self, first_name: str , last_name: str, birth: datetime, hourly_rate: int, labor_hours: int):
  9.     print('serialized data to mysql database')
  10.  
  11. class Employee:
  12.  
  13.   // ...
  14.  
  15.   def save(self):
  16.     db = MySQLStore()
  17.     db.connect()
  18.     db.serialize(self._first_name, self._last_name, self.birth, self._hourly_rate, self._labor_hours)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top