Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
paulddraper
on Sept 19, 2023
|
parent
|
context
|
favorite
| on:
Fixing for loops in Go 1.22
That is correct.
Python used to be worse; it used to share scope
outside the list comprehension
.
nightfly
on Sept 19, 2023
[–]
It still does for regular loops right?
thatguysaguy
on Sept 20, 2023
|
parent
[–]
Yeah loops don't get their own scopes (unless you add one using this thing I made as a joke:
https://github.com/davisyoshida/360blockscope
)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Python used to be worse; it used to share scope outside the list comprehension.