Skip to content

assert shall not be used in production code (control flow)  #83

Open
@boris-42

Description

@boris-42

Asserts should be used only in tests, and should not be used in production code, like here and in other places

https://github.com/RedisGraph/redisgraph-py/blob/master/redisgraph/path.py#L7

There are 2 problems:

  1. If you run with python -o, all these asserts will be ignored and code will stop working
  2. It's a best practice to use own Exceptions or at least default like ValueError with human readable messages

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