<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Rayhan Hasan</title>
    <link>https://www.rayhan.com/</link>
    <description>Recent content on Rayhan Hasan</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 21 Jan 2025 12:00:00 -0500</lastBuildDate>
    <atom:link href="https://www.rayhan.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Python: The Fake &#39;-=-&#39; Operator</title>
      <link>https://www.rayhan.com/blog/2025/01/python-fake-operator/</link>
      <pubDate>Tue, 21 Jan 2025 12:00:00 -0500</pubDate>
      <guid>https://www.rayhan.com/blog/2025/01/python-fake-operator/</guid>
      <description>&lt;p&gt;While writing some Python, I accidentally swapped two characters:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;a =- b       # What I wrote&#xA;a -= b       # What I intended&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s &amp;ldquo;equals minus&amp;rdquo; instead of &amp;ldquo;minus equals&amp;rdquo;. I was initially surprised that the interpreter allowed it. Digging in, I found that &lt;code&gt;a =- b&lt;/code&gt;, is equivalent to &lt;code&gt;a = -b&lt;/code&gt; (spaces don&amp;rsquo;t matter), which is the same as &lt;code&gt;a = -1 * b&lt;/code&gt;. Rather than decrementing &lt;code&gt;a&lt;/code&gt; by the amount &lt;code&gt;b&lt;/code&gt;, I was assigning &lt;code&gt;a&lt;/code&gt; to be the inverse of &lt;code&gt;b&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello, netizens</title>
      <link>https://www.rayhan.com/blog/2023/05/hello-netizens/</link>
      <pubDate>Wed, 03 May 2023 19:23:01 -0400</pubDate>
      <guid>https://www.rayhan.com/blog/2023/05/hello-netizens/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m excited to join the blogosphere.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
