#- >From the prePEP it's not clear (for me) the purpose of #- curencySymbol. #- If it's intended for localisation, then prefix isn't enough, #- some countries use suffix or even such format The idea is to keep separated currencySymbol, thousandSeparator and decimalSeparator, in such a way that if you want to change one of those, just subclass Money and change it. In a money amount shown as $1,234.56 '$' is the currencySymbol, ',' is the thousandSeparator, and '.' is the decimalSeparator. This three elements are useful working with string, not only showing the amount with str(), they're also important when parsing in the creation moment: #standard creation m = Money('12.35') #subclassing class MyMoney(Money): decimalSeparator = ',' #wrong! m = MyMoney('12.35') #right... m = MyMoney('12,35') #- Money(123.45, 2) --> 123 FF 45 GG #- #- where FF is suffix1 and GG is suffix2. This maybe could be addresed with having a currencyPrefix and currencySuffix (the later default would be '') instead just one currencySymbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADVERTENCIA La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley. Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada. Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje. Muchas Gracias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20031020/929ad86f/attachment.html
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4