A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-October/069092.html below:

[Python-Dev] Caching float(0.0)

[Python-Dev] Caching float(0.0) [Python-Dev] Caching float(0.0)Bob Ippolito bob at redivi.com
Sun Oct 1 00:21:50 CEST 2006
On 9/30/06, Terry Reedy <tjreedy at udel.edu> wrote:
>
> "Nick Coghlan" <ncoghlan at gmail.com> wrote in message
> news:451E31ED.7030905 at gmail.com...
> >I suspect the problem would typically stem from floating point values that
> >are
> >read in from a human-readable file rather than being the result of a
> >'calculation' as such:
>
> For such situations, one could create a translation dict for both common
> float values and for non-numeric missing value indicators.  For instance,
> flotran = {'*': None, '1.0':1.0, '2.0':2.0, '4.0':4.0}
> The details, of course, depend on the specific case.

But of course you have to know that common float values are never
cached and that it may cause you problems. Some users may expect them
to be because common strings and integers are cached.

-bob
More information about the Python-Dev mailing list

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