In <[EMAIL PROTECTED]>, 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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to