Would this be called a bug in inspect ?

Stef Mientki stef.mientki at gmail.com
Tue Sep 30 15:59:48 EDT 2008


Gabriel Genellina wrote:
> En Tue, 30 Sep 2008 14:57:55 -0300, Stef Mientki 
> <stef.mientki at gmail.com> escribió:
>
>> I'm not familiar with inspect,
>> but I get an error (see below) in
>>  getmembers ( wx )
>>
>> Of course this is bug in  wx .
>
> Yes.
>
>> But would you also call this a bug in inspect ?
>> (inspect crashes and doesn't continue with th rest of the code, nor 
>> it returns the already gathered data)
>
> getmembers works fine; try m=getmembers(wx) and see.
REALLY GREAT !
> It fails when you attemp to print (or pprint) the returned list.
>
But this is fully beyond my understanding:

    m = getmembers ( wx )
    print m
runs fine


   print getmembers ( wx )
crashes

but not always:
 >>> print getmembers (wx)
[('ACCEL_ALT', 1), ('ACCEL_CMD', 2), ('ACCEL_CTRL', 2), ('ACCEL_NORMAL', 
0), ('ACCEL_SHIFT', 4), ('ADJUST_MINSIZE', 0), (

And to make it even weirder, now I can let your suggestion crash too
 >>> m=getmembers(wx)
 >>> print getmembers (wx)
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 
242, in __repr__
    def __repr__(self):                 return 'wx.Colour' + 
str(self.Get(True))
  File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 
230, in Get
    return _gdi_.Colour_Get(*args, **kwargs)
TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *'
 >>> print m
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 
242, in __repr__
    def __repr__(self):                 return 'wx.Colour' + 
str(self.Get(True))
  File "P:\Python\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 
230, in Get
    return _gdi_.Colour_Get(*args, **kwargs)
TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *'

??????
thanks,
Stef



More information about the Python-list mailing list