IronPython 1.0 - Bugs or Features?
claudio.grondi at freenet.de
Wed Sep 6 16:18:39 CEST 2006
(just wanted to share my experience with IronPython 1.0)
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]
IronPython raises "UnboundLocalError: local variable 'strData'
referenced before assignment" error in following case:
strData = strSomeValue()
if( type(strData) == str ) : ### <<< HERE THE ERROR
CPython 2.4.2 doesn't raise an error with same code.
As strData is not set anywhere before in the code it seems, that
IronPython is somehow right, but I am not sure if it is a bug or a feature.
Another problem with IronPython where CPython 2.4.2 runs ok was while I
was trying to do:
f = file(r'\\.\PhysicalDrive0', 'rb')
getting "ValueError: FileStream will not open Win32 devices such as disk
partitions and tape drives. Avoid use of "\\.\" in the path."
Here the same - I am not sure if it is a bug or a feature.
Can someone knowledgeable elaborate on it a bit please?
More information about the Python-list