Also, we prefer not using asserts in code--rather check a state and then raise a TypeError or a ValueError as is appropriate.