Skip to content

LBYL -> EAFP #29

@CoffeeStraw

Description

@CoffeeStraw

At the moment of writing, a lot of PyonFX's code use LBYL approach ("look before you leap"). This means that a lot of type checking is done and slow down the whole process.

Instead, we should follow EAFP approach ("it’s easier to ask for forgiveness than permission") and the code should be reviewed using try ... except whenever it is possible.

Together with making the code follow the common Python coding style, we should also have a little boost in performance and improve readability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions