Skip to content

Commit 4c25714

Browse files
committed
Reapply "2024-12-06: part two: fixup: use in instead of key index access to prevent default-obj creation (affects len result later in the code)"
This reverts commit e0e0b92.
1 parent 624e72c commit 4c25714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2024/06/06.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def print_map():
1111
for idx in range(width + 1):
1212
if (idy, idx) in obstacles:
1313
print('#', end='')
14-
elif directions := guard_path[(idy, idx)]:
14+
elif directions := guard_path.get((idy, idx)):
1515
horizontal = LEFT in directions or RIGHT in directions
1616
vertical = UP in directions or DOWN in directions
1717
symbol = '+' if horizontal and vertical else '-' if horizontal else '|'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy