<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python Techniques and Tooling on Signal &amp; Syntax</title><link>https://signal-and-syntax.com/categories/python-techniques-and-tooling/</link><description>Recent content in Python Techniques and Tooling on Signal &amp; Syntax</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 17 Sep 2025 13:00:00 -0700</lastBuildDate><atom:link href="https://signal-and-syntax.com/categories/python-techniques-and-tooling/index.xml" rel="self" type="application/rss+xml"/><item><title>Numeric Parsing in Python with Integer Division and Modulus</title><link>https://signal-and-syntax.com/posts/python-integer-division-and-modulus/</link><pubDate>Wed, 17 Sep 2025 13:00:00 -0700</pubDate><guid>https://signal-and-syntax.com/posts/python-integer-division-and-modulus/</guid><description>numbers with // and % for speed and clarity.&amp;quot;
}}
When you need to parse a number, the first instinct is often to convert it to a string and slice it. That works well for data that comes from people — like phone numbers, credit cards, or postal codes — where formatting and leading zeros matter. But when you are working with raw numeric data that is guaranteed to be fixed-width and free of formatting, numeric parsing with integer division (//) and modulus (%) is the better option.</description></item><item><title>Using SymPy in Python When NumPy Isn't Enough</title><link>https://signal-and-syntax.com/posts/python-sympy-vs-numpy/</link><pubDate>Fri, 05 Sep 2025 11:45:00 -0700</pubDate><guid>https://signal-and-syntax.com/posts/python-sympy-vs-numpy/</guid><description>Most of us reach for NumPy whenever math shows up in a project. But sometimes, you don&amp;rsquo;t want approximate answers, you want exact math. That&amp;rsquo;s when you pull SymPy out of your programmer&amp;rsquo;s toolkit and get to work.
It&amp;rsquo;s easy to think of SymPy only in academic terms, like running physics simulations where small rounding errors can snowball into nonsense, or checking algebraic identities where a value such as 0.0000001 should really be treated as exactly 0.</description></item><item><title>Using Python Dispatch Tables for Cleaner Validation</title><link>https://signal-and-syntax.com/posts/python-dispatch-maps/</link><pubDate>Fri, 22 Aug 2025 10:38:20 -0700</pubDate><guid>https://signal-and-syntax.com/posts/python-dispatch-maps/</guid><description>Let&amp;rsquo;s be honest: argument validation code is rarely the proudest part of anyone&amp;rsquo;s repo.
Most of us start with the usual suspects:
❌ The dreaded inverted-V tower of if/else statements
❌ A graveyard of guard clauses scattered line after line
Both work fine… until they don&amp;rsquo;t. Then you&amp;rsquo;re left maintaining a wall of conditionals that feels like it was designed by a committee of goblins.
There&amp;rsquo;s a better way: dispatch tables!</description></item></channel></rss>