Comment

Comment by dfinninger

> 4. type-hints are ok for very very big projects.

Great for smaller ones too! I type annotate every function, even

    def parse_args() -> argparse.Namespace:
        pass
at the top of simple scripts. With a good IDE (VS Code fits here too), the extra language lookups/insight you get are awesome. Command+mouse_hover gives me a great bit of information about args passed into the function if I annotate the inputs.
parent dfinninger 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton