Skip to content

better error when using = in boolean position #1120

Open
@shriram

Description

@shriram

This has got to be a not-uncommon error:

n = 1

if n = 0:
  print "yes"
else:
  print "no"
end

whether for people coming from other languages, or from typos (I know I've made it a few times). Is a better error possible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions