# Literals for Decimal and Fraction

**URL:** <https://discuss.python.org/t/literals-for-decimal-and-fraction/63423>\
**Category:** Ideas\
**Created:** [September 10, 2024, 2:38am UTC](https://discuss.python.org/t/literals-for-decimal-and-fraction/63423 "2024-09-10T02:38:00Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![skirpichev](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/skirpichev/32/10996_2.png) [@skirpichev](https://discuss.python.org/u/skirpichev)\
**Post date:** [July 20, 2025, 9:12am UTC](https://discuss.python.org/t/literals-for-decimal-and-fraction/63423/25 "2025-07-20T09:12:26Z")

</div>

> [@Lucas\_Malor](#):
>
> What about adding to builtins a `Decimal` and `Fraction` functions, which simply call `decimal.Decimal` and `fractions.Fraction`

What is the difference wrt proposal “have Decimal and Fraction as builtins”?

> [@Lucas\_Malor](#):
>
> can’t `fractions.Fraction` be simply moved to builtins as fraction and delete the module? It seems that module has only that class.

Not only fractions module in the stdlib has only one public class or function. E.g. `sched` or `html.parser`.

It’s again a question “why not have the Fraction as a builtin?” But to support this you need some other arguments (see e.g. [Revise true division for ints? Lets return (optionally) a Fraction!](https://discuss.python.org/t/63454)), just the number of public interfaces in the fractions module is irrelevant here.

---

_[View the full topic](https://discuss.python.org/t/literals-for-decimal-and-fraction/63423)._
