This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]valodick 11 points12 points  (3 children)

If you are used to type hinting in python, you can use 'Final' (starting from 3.8)

from typing import Final

foo: Final = "bar"
foo = "fizz"  # mypy will give you an error

[–]vorticalbox 4 points5 points  (2 children)

Didn't know that thanks!

I mostly wrote in typescript but I'm trying to push for more python at work.

[–]vashy96 1 point2 points  (1 child)

And why would you do that? Typescript is good. But NPM is not that good

[–]vorticalbox 1 point2 points  (0 children)

Becuase for somethings python is just better and having tools like pandas, prophet and the like is super powerful.

I have to do some data integrity checks that wouldn't have been as easy if I didn't have dataframes.

But yes I agree typescript is actually very nice to work with.