Skip to content

Remove parameter checking #108

@oakleybrunt

Description

@oakleybrunt

I have spoken with Ben Went today and had a look over the helper functions he has been using (separately to PSyTran), and I noticed that he had a lot of parameter checking before any functionality. He said that he was following the style laid out in PSyTran.

After reviewing how PSyTran does things, it does seem like there is a lot of parameter checking happening (for safety, I understand). However, this is not a habit I want people to get into - PSyclone will give an error if the types are wrong. For example, in apply_loop_directive a check is performed on the options parameter to see if it is a dictionary. If a non-dict object is passed here, PSyclone provides this error message:

psyclone.psyir.transformations.transformation_error.TransformationError: Transformation Error:
Transformation validate method 'options' argument must be a dictionary but found 'list'.

I propose that all type checking is removed (unless absolutely necessary) since PSyclone handles this.

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