(no title)
arathore | 4 years ago
Traceback (most recent call last):
File "distance.py", line 11, in <module>
print(manhattan_distance(p1, p2))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "distance.py", line 6, in manhattan_distance
return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'x'
This is such a great quality of life improvement.
RheingoldRiver|4 years ago
aroberge|4 years ago
pletnes|4 years ago
BiteCode_dev|4 years ago
Everybody talks about the pattern matching, but I'm excited about this. I'm going to upgrade ASAP just so for it.
Alex3917|4 years ago
junon|4 years ago
[0] https://GitHub.com/qix-/better-exceptions
Moosdijk|4 years ago
[1] https://docs.python.org/3.11/whatsnew/3.11.html