Class instantiation
Colin J. Williams
cjw at sympatico.ca
Wed Aug 23 18:44:09 EDT 2006
Fredrik Lundh wrote:
> Colin J. Williams wrote:
>
>> In the example below, with the disassembly following that, we run into
>> trouble with the line:
>> self.connect(fileID, mode= 'r') # open sheet in the read mode
>>
>> the traceback is:
>> Traceback (most recent call last):
>> File "C:\Documents and Settings\cjw\My Documents\OODev\tArray.py",
>> line 26, in __init__
>> self.connect(fileID, mode= 'r') # open sheet in the read mode
>> NameError: global name 'fileID' is not defined
>>
>> At line 26, location 31, why is LOAD_GLOBAL generated for fileId, when
>> LOAD_FAST has done the job at locations 0 and 20?
>
> hint: Python is case-sensitive.
>
> </F>
>
Thanks to those who responded. Paul McNett sums it up - DOH!
Colin W.
More information about the Python-list
mailing list