<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fractions on Nalar</title>
    <link>https://nalar.dev/tags/fractions/</link>
    <description>Recent content in Fractions on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 09 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/fractions/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Accept Numeric Protocols with Fraction.from_number</title>
      <link>https://nalar.dev/accept-numeric-protocols-with-fraction-from-number/</link>
      <pubDate>Wed, 09 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/accept-numeric-protocols-with-fraction-from-number/</guid>
      <description>&lt;p&gt;A function that accepts a number and a function that parses text are not quite the same API.&lt;/p&gt;&#xA;&lt;p&gt;I keep running into this distinction in configuration code, pricing tools, import pipelines, and small libraries. The caller may already have an &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;Decimal&lt;/code&gt;, or another numeric object. In that case, accepting a string such as &lt;code&gt;&amp;quot;0.25&amp;quot;&lt;/code&gt; just because it happens to look numeric can make the boundary less clear than it needs to be.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
