2 ms·
Indeed, you'll find that type annotations and enforcing them with a type checker will eliminate all those `assert`s for `not None`.
by hannofcart 6y ago
Indeed, you'll find that type annotations and enforcing them with a type checker will eliminate all those `assert`s for `not None`.
- zo1 6y agoIt won't eliminate it, but... At the very least it'll "push it back" quite close to the point in your code where someone made a not-so-well-thought out decision to accept nullability into a variable and let it propagate that uncertainty into the rest of the system.