Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Pandas
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Before type hinting, work had intense rules and linters enforcing docstrings with types. Now, type hints and automatic pyre runs take care of all the heavy lifting.
You have some data. You expect it to unpack into nicely defined types. You define those types (e.g. Pydantic), cast your bytestream or string into it with an appropriate deserializer just like you would in something like Java, and go about your day.
That's quite untrue as well, and that matters for salvaging messy data. Let's highlight pandas for this one, since I've already beat the DTO angle to death in other comments. Let's say you got a gigantic pile of data, and all you really know is that it's supposed to be CSV. Now you need to feed it into a BI system.
Java's verbosity can even be reduced of you are able to use lombok
Man if you think python has great mocking/testing support, you check out some ruby tests! Honestly some of the best testing libraries that pioneered approaches that are becoming more common elsewhere, such as the expectations syntax. And now that I'm coding more in python I find myself missing libaries like webmock, letting you stub web reqests in a way that's agnostic of the HTTP/web libary, chef's kiss.
Well Go does not abstract things behding layers of unknown, dealing with Database is actually ok especially with library such as: https://sqlc.dev/
I'm sure there are exceptional situations, but I'm struggling to see why any decent test would be interacting with private methods and variables. It would be like creating datetime() and then making tests that interact with the source code of datetime(). In this hypothetical situation, you should be testing the functionality of its date and time manipulation, not touching private methods like _format_time() or fromisoformat().
It's pretty common for codebases to use CI and CD to automatically package, run tests, upload, and/or deploy projects. If you add mypy to your CI test pipeline, then no code will pass tests that violates type annotations, and therefore, you can not deploy code that violates the stated types.