News for hackers. Stuff that matters.
Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by pdonis on Friday April 16, 2021 @04:07PM (#26838501)
> In python I would often have to think _more_ about it and look into the documentation or maybe even the implementation to understand if it could return an empty list or not.

In many cases in Python, you don't have to care. For example, if you're going to iterate over the list, Python will iterate over an empty list just fine: it will execute zero iterations. No need to check anything.

Re:Python 3 Types in the Wild: A Tale of Two Type Systems [pdf] by valenterry on Friday April 16, 2021 @10:25PM (#26841136)
Right. I was referring to the cases where you must care, such as presenting a list of errors to someone or doing a calculation where an empty list must be considered in a special way if it occurs etc.