[Python-Dev] Re: Decimal data type issues

Batista, Facundo FBatista at uniFON.com.ar
Thu Apr 22 10:20:52 EDT 2004


[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



More information about the Python-Dev mailing list