Skip to content

Replace assert statements by if / raise #428

@DomInvivo

Description

@DomInvivo

My understanding is that assert statements can be removed at compile time (to improve performance, which seems specifically relevant to Graphium), so any error that a downstream user can make and should be informed about should ideally be a raised and specific (e.g. RuntimeError, ValueError, TypeError, KeyError, ...) Exception. To have sanity checks during debugging / development, you can still use assert statements.

Originally posted by @cwognum in #414 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions