What are the differences between the `None` handling of Typing in Python and `Err != nil` in Golang?

Posted by Wide-Milk1195@reddit | Python | View on Reddit | 19 comments

I'm a junior programmer with limited understanding of Python and Golang. However, through coding, I've noticed a commonality: Python functions return "value | None", while Golang functions return "value &err". When dealing

with Python function return values, I need to write:

``` 
data = func()
if data is None:
  # raise Error
  # Log
  # ...
# I haven't used assert in a production environment, only in tests
```
When dealing with Golang function return values, I need to write:
``` 
data,err = func()
if err != nil:
  # return error
  # Log
  # ...
``` 
Writing rigorous Python code is no less cumbersome than Golang. I'd like to ask intermediate to advanced Python developers: can Python with strict typing (handling None and Any) handle medium-sized projects?