radon-project / radon

The Radon Programming Language
https://radon-project.github.io
GNU General Public License v3.0
23 stars 2 forks source link

Fix tests #148

Closed angelcaru closed 4 months ago

angelcaru commented 4 months ago

please stop treating optionals as booleans

Almas-Ali commented 4 months ago

please stop treating optionals as booleans

Can you please explain this?

angelcaru commented 4 months ago

So the code for this project has a lot of:

if not <something that might be a value, or None>:
    <assume that it's None>

Which is bad because a value can evaluate to false without being None. That was the cause of the 2 bugs I fixed, and I wouldn't be surprised if there are more