Thank you Venkat.

Regards,
Ranjith



On Mon, Jul 4, 2016 at 9:30 PM, <chennaipy-requ...@python.org> wrote:

> Send Chennaipy mailing list submissions to
>         chennaipy@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.python.org/mailman/listinfo/chennaipy
> or, via email, send a message with subject or body 'help' to
>         chennaipy-requ...@python.org
>
> You can reach the person managing the list at
>         chennaipy-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Chennaipy digest..."
>
>
> Today's Topics:
>
>    1. Help with Python (Abdur Rub)
>    2. Re: Python interpreter (venkata krishnan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 3 Jul 2016 22:54:12 +0530
> From: Abdur Rub <abdur.engin...@gmail.com>
> To: chennaipy@python.org
> Subject: [Chennaipy] Help with Python
> Message-ID:
>         <
> camdp94w2sibw1awspjywfnrmjvyqasxfjg3aj4j9cnvuqpx...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear all,
>
> I posted the following on Stack overflow.
> http://stackoverflow.com/q/38171869/6426077
> wonder if anyone here could help
>
> thanks
> Abdur
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/chennaipy/attachments/20160703/4dbccb5f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Sun, 3 Jul 2016 17:52:43 +0000 (UTC)
> From: venkata krishnan <ve_kr...@yahoo.com>
> To: "chennaipy@python.org" <chennaipy@python.org>
> Subject: Re: [Chennaipy] Python interpreter
> Message-ID:
>         <385017020.1210430.1467568363516.javamail.ya...@mail.yahoo.com>
> Content-Type: text/plain; charset=UTF-8
>
> Dear Ranjit,
>
> It is not the interpreter alone in action and it flutters. From my
> learning by going through the articles below.
> It works in conjunction with Symbol table to determine the scope of each
> name binding. So, before it reaches the print(x) in case 2. It has the
> symbol table prepared for the function/block. When the LEGB scoping rule
> applied. It finds that, you have already an assignment operator for x in
> that scope. Thus, it treats it as an UnboundLocalError. Where as in case 1.
> The symbol table would not have any local scope/assignment for x.
>
>
> Please go through below links(articles) from below. Has a very good
> explanation of "UnboundLocalError".
> 1.
> http://eli.thegreenplace.net/2011/05/15/understanding-unboundlocalerror-in-python/
> 2. Symbol table construction in Python's compiler
>     Part1:
> http://eli.thegreenplace.net/2010/09/18/python-internals-symbol-tables-part-1/
>
>     Part2:
> http://eli.thegreenplace.net/2010/09/20/python-internals-symbol-tables-part-2/
>
>
> Thanks
> Venkat
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Chennaipy mailing list
> Chennaipy@python.org
> https://mail.python.org/mailman/listinfo/chennaipy
>
>
> ------------------------------
>
> End of Chennaipy Digest, Vol 35, Issue 4
> ****************************************
>
_______________________________________________
Chennaipy mailing list
Chennaipy@python.org
https://mail.python.org/mailman/listinfo/chennaipy

Reply via email to