[Python-Dev] Re: Decimal data type issues (original) (raw)
Batista, Facundo FBatista at uniFON.com.ar
Thu Apr 22 10:20:52 EDT 2004
- Previous message: [Python-Dev] Re: Proposal: A more powerful alternativeto ConfigParser
- Next message: [Python-Dev] Re: Decimal data type issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Tim Peters]
#- The second way of spelling it is fine, but there's no need #- to cater to an #- optional context argument. Decimal.using_context(input) #- should use the #- current context object. It's been a general rule so far #- that all operations #- are available as methods of context objects too, so in the #- goofy case (I #- say "goofy" because I predict it won't be used in real life) #- of wanting to #- force use of a particular non-current context object c, the #- natural spelling #- is (or should be) #- #- c.using_context(input)
You mean adding a method to the context, to create a Decimal using itself as context and not the one from the thread?
If yes, what about c.create_decimal(number) ?
And with floats? c.create_decimal_from_float(number)? Or the same method that before?
. Facundo
- Previous message: [Python-Dev] Re: Proposal: A more powerful alternativeto ConfigParser
- Next message: [Python-Dev] Re: Decimal data type issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]