News for hackers. Stuff that matters.
Re:PEP 584 – Add + and – operators to the built-in dict class by rocqua on Wednesday March 06, 2019 @09:57AM (#19319330)
> It very nice that dict and set are very distincts, and that they have a distint set of operators. This way it's super easy to scan the code and know what the data structure is, and what it's used for.

This is exactly why I want explicit typing in Python.

Re:PEP 584 – Add + and – operators to the built-in dict class by sametmax on Wednesday March 06, 2019 @10:13AM (#19319443)
You do with type annotations.

But type declaration may not be in the view port.

Or you may read a script or snippet, which is a type or code that won't bother with typing.

Re:PEP 584 – Add + and – operators to the built-in dict class by klibertp on Wednesday March 06, 2019 @01:40PM (#19321367)
> But type declaration may not be in the view port.

Type declaration doesn't have to be in the view; the very point of type annotations is to support static type systems, which you can query about any type. For example, if you use mypy, you can add `reveal_type( any_kind_of_expr )` anywhere in your code and you'll get the most precise type available, be it inferred or declared manually, for that expression at given point in code.