PKmJ rr purrency.py """ Simple currency parser with Python """ from re import sub from decimal import Decimal __version__ = '0.3' class Purrency(object): """Parser class.""" def __init__(self, denomination): self.denomination = denomination self.parsed = self.parse(self.denomination) def parse(self, denomination): value = Decimal(sub(r'[^\d.]', '', denomination)) # TODO: Need to figure out how to implement regex without the .replace() currency = sub(r'[^\D]', '', denomination).replace(',', '').replace('.', '') return {'amount': value, 'symbol': currency} PK!H|&Ubpurrency-0.3.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q034 /, (-JLR()*M ILR(4KM̫#DPK!H%7purrency-0.3.dist-info/METADATA= 0E>vYNPP4@& iMt{;%4zS%P$!YlnWE1ZuD~6 0zq} )4}7l䧲}z|8RΝZtWVu3nZ_PK!Hɦ purrency-0.3.dist-info/RECORDuKr0нg Tçp`4 #` /wK^;vUfΠ//в7S||?e"ت"Ih =AO TwV:L>˧iJIvޕGEzc*_~!|yv#ShIy