PK̻iJ}:: purrency.py """ Simple currency parser with Python """ from re import sub from decimal import Decimal __version__ = '0.2' class Purrency(object): """Parser class.""" def __init__(self, denomination): self.denomination = denomination def parse(self): value = Decimal(sub(r'[^\d.]', '', self.denomination)) # TODO: Need to figure out how to implement regex without the .replace() currency = sub(r'[^\D]', '', self.denomination).replace(',', '').replace('.', '') return {'amount': value, 'symbol': currency} PK!H|&Ubpurrency-0.2.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q034 /, (-JLR()*M ILR(4KM̫#DPK!Ho˪@ ]j݋Z D1p*>uߵ.0yPK̻iJ}:: purrency.pyPK!H|&Ubcpurrency-0.2.dist-info/WHEELPK!H