2
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> i write parsers for fun but i know i&#39;m georg spiders here</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@tef" class="u-url mention">@<span>tef</span></a></span> i disagree: vegetables are disgusting but state machines are delicious</p>
<p><span class="h-card" translate="no"><a href="https://rants.au/@sabik" class="u-url mention">@<span>sabik</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> hasattr(&quot;__iadd__&quot;) and ignore exceptions?</p>
<p>the rest of my advice is just &quot;eat your vegetables&quot; (i.e yes, you&#39;re going to have to write a state machine, i&#39;m sorry, them&#39;s the breaks)</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> </p><p>You chose violence. Seriously Lawful Neutral energy. </p><p>I approve.</p><p>Now, what kind of practical code can we come up with that needs y&#39;all() ?</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> <br />Nice!</p><p>That hard-coded `int` type is bugging me, though</p><p>For one thing, `yall += 4` should also increment float, Decimal and Fraction variables, as well as third-party types like NumPy arrays and ORM proxy objects</p><p>There&#39;s also no reason to disallow `yall += &quot;!&quot;` or `yall += [4]`</p><p>I don&#39;t know how to design it better, though. Maybe increment all variables regardless of type, possibly excluding `self`? Not sure</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> omg I am loving this thread so much 😂</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.social/@mcc" class="u-url mention">@<span>mcc</span></a></span> <span class="h-card" translate="no"><a href="https://digipres.club/@foone" class="u-url mention">@<span>foone</span></a></span> I love hate this so much, thank you</p>
<p>i guess the other 10% of advice is &quot;people will make changes in the easiest place to make them, so if you don&#39;t clean up afterwards, you&#39;ll run out of easy places to change things&quot;</p>