Advertisement
Peaser

asshole

Dec 6th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. class dub(float):
  2.     """Two data values stored as float, separated by decimal"""
  3.     def __init__(self, decimal): self.value = decimal
  4.     left     = lambda self:int(str(self.value).split(".")[0])
  5.     right    = lambda self:int(str(self.value).split(".")[1])
  6.     asTuple  = lambda self:tuple(str(self.value).split("."))
  7.     asList   = lambda self:list(str(self.value).split("."))
  8.  
  9.  
  10.     val1 = left
  11.     val2 = right
  12.  
  13.     first  = left
  14.     second = right
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement