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.
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 ... exceptwhenever 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.