IronPython 1.0 - Bugs or Features?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Sep 6 11:24:55 EDT 2006


In <edmlbv$a9h$1 at newsreader2.netcologne.de>, Claudio Grondi wrote:

> The context:
>    C:\IronPython> ipy.exe
>    IronPython 1.0.60816 on .NET 2.0.50727.42
>    Copyright (c) Microsoft Corporation. All rights reserved.
> vs.
>    C:\Python24> python.exe
>    Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] 
> on win32
> 
> IronPython raises "UnboundLocalError: local variable 'strData' 
> referenced before assignment" error in following case:
> <code>
>      while(someCondition):
>        try:
>          strData = strSomeValue()
>        except:
>          pass
>        if( type(strData) == str ) : ### <<< HERE THE ERROR
>          doSomething()
> </code>
> CPython 2.4.2 doesn't raise an error with same code.

Well I get a `NameError`  for `someCondition`.  Please post a minimal
*working* example that produced the error.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list