[Pymoney-general] Re: Structure for per-country currency information
Brought to you by:
facundobatista
From: Mariano D. <ch...@si...> - 2005-07-02 00:08:06
|
Facundo Batista wrote: [... snip ...] > I have issues with the three structures proposed so far: > > 1. Mine: Clearly wrong! The currency string is repeated and we can not use > it as a dictionary key. > > 2. Darek's: Don't like the not-flat property > > 3. Jeff's: Brings another layer of complexity: How do you choose (as a > developer) and how do you predict (as user) the inserted two letters? > About Jeff's proposal: I think the "inserted two letters" are the ISO standard code for the country, aren't they? If they are, we don't have to predict anything, given that I know the currency I need to work with, and the country in wich I need to use it. > > Before chosing one, keeping proposing others, or discuss the actual ones, I > think that we must focus in specifying what we need: > > 1. What information we want in the structure (or structures) > My biggest problem with any of the structures discussed so far is that they seem to be too rigid. I think we need an extensible structure. Maybe that's because I live in Argentina... and we have "experience" changing currencies (and even using "pseudo-currencies") at leaste once every ten years or so... So today our currency is "ARS". But what if next year it's "Australes" again? If that happen, I'd like to extend and/or update the structures to reflect that change, and even using BOTH currencies at the same time... at least for a few months. I like Jeff's proposal, because it links together a country-code and a currency-code. That way, I can use as many currencies as I need for a given country, assuming I won't be forced to choose an "ISO" code for the currency (what's the ISO code for "Patacones" or "LECOPS" or "Guaraníes" or any of the pseudo-currencies that the argentinian government created not so long ago?) I'm sure the structure should have a country code and a currency code. > 2. The standard source of that information > For the country I'd choose the standard two-letter ISO code . For the currency, we might use the standard ISO code too, but it should be possible to add new currency-codes to the structure, even if they aren't standard. > 3. How we want to access that information > I'm not sure how I'd like to access that structure a) Given a country, access its currency(ies); b) Given a currency, access the country(ies) where it is used; c) both; > Then, we could specify the structure/s that we'll use. > > So, start shooting! :) > There you're :) -- Mariano |