PKTbJ<< purrency.py """ Simple currency parser with Python """ from re import sub from decimal import Decimal __version__ = '0.1' 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, 'currency': currency} PK!H|&Ubpurrency-0.1.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q034 /, (-JLR()*M ILR(4KM̫#DPK!Hvpurrency-0.1.dist-info/METADATA=0E@]v%;u=#4Ц^HsnνSF7d$XB& HQt,V0&yG?gKl9Ȧ[Z{nE`ܬ)-ۗG,(MqСqiakWPK!H K purrency-0.1.dist-info/RECORDun0RZD$ꅠЎ >==ger@x8\{.80jO Mz}Χ ݫzG7|d9e؈25:l}z&M{Wr`V%HڵӹHt*7eMQ5J%6+PKTbJ<< purrency.pyPK!H|&Ubepurrency-0.1.dist-info/WHEELPK!Hvpurrency-0.1.dist-info/METADATAPK!H K purrency-0.1.dist-info/RECORDPK