# Scoping rules for try - catch - finally

**URL:** <https://discourse.julialang.org/t/scoping-rules-for-try-catch-finally/32617>\
**Category:** New to Julia\
**Created:** [December 23, 2019, 10:33am UTC](https://discourse.julialang.org/t/scoping-rules-for-try-catch-finally/32617 "2019-12-23T10:33:49Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [January 12, 2020, 5:13pm UTC](https://discourse.julialang.org/t/scoping-rules-for-try-catch-finally/32617/21 "2020-01-12T17:13:29Z")

</div>

> [@Sijun](#):
>
> Because of the ` soln = 2` in `else` block, …

OK, I see, thank you for the explanation.

> [@Sijun](#):
>
> Unlike to Python, where a left hand side variable in a loop is local to the loop by default

Python is not the topic here, but AFAIK loops do not introduce a new scope there.

---

<div class="post-metadata">

**Author:** ![Sijun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Post date:** [January 12, 2020, 9:40pm UTC](https://discourse.julialang.org/t/scoping-rules-for-try-catch-finally/32617/22 "2020-01-12T21:40:26Z")

</div>

I am sorry. You are right. I was a little hasty / careless in answering. Thank you for pointing it out.

[Previous page](https://discourse.julialang.org/t/scoping-rules-for-try-catch-finally/32617.md?page=1)
