Skip to content

Add content on when to (and when not to) use asserts? #625

Open
@DamienIrving

Description

@DamienIrving

I did a Data Carpentry workshop earlier in the year and some of the very knowledgeable instructors at the workshop suggested reconsidering the use of asserts in the defensive programming lesson I delivered (see carpentries-lab/python-aos-lesson#36 for details).

If we ever write an update of this book, I wonder if we need to add some words/advice about when and when not to use asserts. Perhaps a condensed version of the following two posts (which were mentioned in the issue I linked to above)?
https://dev.to/yloganathan/do-not-abuse-the-assert-1cfm
https://archive.is/5GfiG

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussiondiscussion before a proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions