Elektrine lite

← Feed

Paul McGuire

ptmcg@fosstodon.org

<p>he/him - Author/maintainer of <a href="https://fosstodon.org/tags/pyparsing" class="mention hashtag" rel="tag">#<span>pyparsing</span></a>, <a href="https://fosstodon.org/tags/littletable" class="mention hashtag" rel="tag">#<span>littletable</span></a>, <a href="https://fosstodon.org/tags/plusminus" class="mention hashtag" rel="tag">#<span>plusminus</span></a> - I do digital art when I get the time. Co-author of &quot;Python in a Nutshell, 4th Ed&quot;. PSF Fellow. Avatar: NAT <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pynutshell4" class="mention hashtag" rel="tag">#<span>pynutshell4</span></a></p>

Posts

  • Post #1700039

    Here are some emojidentifiers for your next Python code: import math 乁_ツ_ㄏ = None 乁_益_ㄏ = math.nan ఠ_ఠ = isinstance def minnums(values: list | 乁_ツ_ㄏ = 乁_ツ_ㄏ): if ( values is 乁_ツ_ㄏ or not all(ఠ_ఠ(n, (float, int)) for n in values) ): return 乁_益_ㄏ return min(values) #python #unicode #emoji

  • Post #621934

    I saw a TIL post on bsky today about using &amp;#39;/&amp;#39; with pathlib.Path&amp;#39;s. Some other features recently added to #python - itertools.batched (3.12) - accessing re.Match groups using m[1] notation (faster than calling m.group(1)) (3.6) - 1_000_000 is a legal syntax for 1000000 (3.6) - command-line access to stdlib modules (python -m &amp;lt;name&amp;gt;) - uuid (3.12) - json (3.14) - random (3.13) - sqlite3 (3.12) - http.server (3.4) - f-strings (3.6) - true multithrea...