Re: [cx-oracle-users] float vs. int
Brought to you by:
atuining
From: Anthony T. <an...@co...> - 2003-11-24 17:51:55
|
Just thought I'd let all of you know that I have implemented the returning of longs when an integer with more than 9 digits of precision is returned. This will be available in the next release of cx_Oracle, whenever that is. :-) I have also implemented the ability to subclass connections and cursors (requiring Python 2.2 and up) which works quite well. Are there any of you out there that are just dying for these features? Or is it something that can wait for a month or two? On Sat, 2003-09-27 at 21:27, Geoff Gerrietts wrote: > Quoting Geoff Gerrietts (ge...@ge...): > > What are the criteria for deciding when a NUMBER will be returned as > > a float, or when it will be returned as an int or long? > > Terribly sorry; found the answer in the mailing list archives. > > I think for my uses, anything with a scale 0 < sys.maxint should be an > integer, and anything with a scale 0 > sys.maxint should be a long. > This does not violate the principle of least surprise, and it also > relieves me of the burden of post-processing every query result so > CORBA doesn't barf. > > With decimals, it would be nice to work with fixed point rather than > floats, but that would likely be a substantial change in my > application: floats are everywhere, and in several places, I expect > them to be floats. > > Thanks, > --G. -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |