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

  • View post

    More projects using #pyparsing: - ASE2SPRKKR: a unified Python framework integrating the Spin-Polarized Relativistic Korringa-Kohn-Rostoker method into the Atomic Simulation Environment - generates Pyparsing parsers to process input data files https://arxiv.org/pdf/2608.05957 https://github.com/ase2sprkkr/ase2sprkkr - dqc_simulator: an easy-to-use distributed quantum computing simulator - uses pyparsing to implement a command API to the NetSquid package https://arxiv.org/pdf/2604.13909...

  • View post

    @JessTheUnstill Same. The good stuff is wasted on me, especially after I add 2 teaspoons of sugar, then top up with whole milk and/or Grand Marnier (how I drink coffee, not wine). I&amp;#39;ve also started trying maple syrup instead of sugar, for more caramely taste without the hassle of caramel syrup. (And I _do_ insist on real maple syrup - we used to make it at home when I was a kid, and I won&amp;#39;t touch that Log Cabin abomination.)

  • View post

    tl;dr https://www.python-a2z.info/ is a website I created for myself because the online #Python docs need a jump page. Ever tried to search the online docs for the builtin &amp;quot;set&amp;quot; type? You get every page that has the word &amp;quot;set&amp;quot; in it, and &amp;quot;set&amp;quot; is a pretty popular word! Same story for &amp;quot;list&amp;quot;, &amp;quot;dict&amp;quot;, and many more. &amp;quot;f-strings&amp;quot;? Unless you know to look for &amp;quot;Formatted String Liter...

  • View post

    And these simplifications to type hints: - typing simplifications - List, Dict, Tuple, etc. -&gt; list, dict, and tuple (3.9) - Union[X, Y] and Optional[X] -&gt; X|Y and X|None (3.10) - no more class Z(Generic[T]), just class Z[T] (3.12) - also def last[T](seq: Sequence[T]) -&gt; T (3.12) - &#39;type&#39; as a statement (3.12)

  • View post

    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