FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Assignment of a variable to itself in Planning.py · Issue #974 · aimacode/aima-python · GitHub

Repository navigation

Assignment of a variable to itself in Planning.py #974

Description

Please have a look at code snippet from Planning.py

clauses = clauses

This assignment assigns a variable to itself & assigning a variable to itself is redundant and often an indication of a mistake in the code.

I want to work on this Issue and would like to correct this.

Should I go ahead with this? Maintainers, Please confirm. Thanks

Activity

  1. ad71 commented on Oct 16, 2018

    Contributor

    It's not a big deal, you can replace that line with 'pass' instead, but it makes no difference.

  2. ParthS007 commented on Oct 16, 2018

    ContributorAuthor

    @ad71 Thanks for the comment. Should I close the Issue?
    Can you please redirect me to some beginner friendly Issues. I want to start contributing to this repo.
    Thanks

  3. ad71 commented on Oct 16, 2018

    Contributor

    You should probably change that line to pass because that is syntactically appropriate.
    Apart from that, you can look for similar errors throughout the repository. I'm sure there are quite a few semantically incorrect snippets. Unfortunately, we don't have records of such errors.
    You can probably try solving #961 if you're familiar with agents in an environment or first-order logic, or you can have a look at #948 where I have enumerated the stuff that can be done.

  4. ParthS007 commented on Oct 16, 2018

    ContributorAuthor

    ok, @ad71. I will make a PR for this Issue shortly and will go through the Issues mentioned above. Thanks for the help.

  5. dmeoli commented on Jun 27, 2026

    Member

    This was resolved by #976 (commit 152e5b0): the redundant clauses = clauses self-assignment in PlanningProblem.convert's except AttributeError handler was replaced with pass. No occurrence remains in planning.py/planning4e.py on current master. Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL