Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
heavenlyblue
on Oct 18, 2021
|
parent
|
context
|
favorite
| on:
Python stands to lose its GIL, and gain a lot of s...
No it's not the same. The visibility of variable "foo" is extended beyond it's usefullness if you use `if`.
pansa2
on Oct 18, 2021
[–]
No, the visibility of `foo` is the same in both examples. Python’s `if` statements do not introduce a new scope.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: