[issue2237] Inconsistent variable lookup

2008-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > ... adding a line to end the code AFFECTS its beginning ... Exactly. Please see http://docs.python.org/dev/reference/executionmodel.html """ If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treate

[issue2237] Inconsistent variable lookup

2008-03-04 Thread Benjamin Peterson
Changes by Benjamin Peterson: -- type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue2237] Inconsistent variable lookup

2008-03-04 Thread Sylwester Warecki
New submission from Sylwester Warecki: Hi! An example below shows how differently local variables are treated in case of simple variables and classes. In case of objects the variable refers to global object, in case of simple number - it refers to a local. Example 2 shows worse case scenario.