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/2000-September/009620.html below:

[Python-Dev] unicodedata.numeric (was RE: stupid floating point question...)

[Python-Dev] unicodedata.numeric (was RE: stupid floating point question...) [Python-Dev] unicodedata.numeric (was RE: stupid floating point question...)The Ping of Death ping@lfw.org
Thu, 28 Sep 2000 15:35:24 -0500 (CDT)
On Thu, 28 Sep 2000, Fredrik Lundh wrote:
> if I had access to the time machine, I'd change it to:
> 
> >>> unicodedata.numeric(u"\N{VULGAR FRACTION ONE THIRD}")
> (1, 3)
> 
> ...but maybe we can add an alternate API that returns the
> *exact* fraction (as a numerator/denominator tuple)?
> 
> >>> unicodedata.numeric2(u"\N{VULGAR FRACTION ONE THIRD}")
> (1, 3)
> 
> (hopefully, someone will come up with a better name)

unicodedata.rational might be an obvious choice.

    >>> unicodedata.rational(u"\N{VULGAR FRACTION ONE THIRD}")
    (1, 3)


-- ?!ng




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