Guest User

Untitled

a guest
Dec 9th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import time
  2.  
  3. class SmoothCacheTime(int):
  4. def __new__(cls, value=None):
  5. if value is None:
  6. value = time.time()
  7. i = int.__new__(cls, value)
  8. return i
  9.  
  10. i = SmoothCacheTime()
  11. print i
  12. print isinstance(i, SmoothCacheTime)
Add Comment
Please, Sign In to add comment