> al...@us... wrote:
>> Revision: 451
>> Author: allenb
>> Date: 2006-08-23 16:30:51 -0700 (Wed, 23 Aug 2006)
>> ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=3D451&view=3Drev
>>
>> Log Message:
>> -----------
>> I *think* this fixes a bug.
>>
>> As far as I can tell with Python 2.4 atleast bool([False,True]) is sti=
ll
>> true so the logic of this test was not working.
>>
>> Please review this commit to verify that I have fixed something though=
.
>>
>> Modified Paths:
>> --------------
>> pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py
>> Modified: pygccxml_dev/pygccxml/declarations/mdecl_wrapper.py
>> [...]
>> invalid_decls =3D filter( lambda d: not hasattr( d, name ),
>> self.decls )
>> - if invalid_decls:
>> + if False in invalid_decls:
>> raise RuntimeError( "Not all declarations have '%s'
>> attribute." % name )
>
> This doesn't look like a fix to me.... (what had to be fixed here
> anyway?).
>
> The previous 'if' statement was equivalent to
>
> if len(invalid_decls)!=3D0:
> ...
>
> which looked all right to me (note that the previous line uses "filter"=
,
> not "map").
You are right. I missed that it was a call to filter. Somehow my brain
translated that to "map". My bad. :(
-Allen
>
> The new 'if' statement checks if the list contains the value "False"
> which I don't think will ever happen.
>
>
> - Matthias -
>
> -----------------------------------------------------------------------=
--
> Using Tomcat but need to do more? Need to support web services, securit=
y?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron=
imo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> pygccxml-development mailing list
> pyg...@li...
> https://lists.sourceforge.net/lists/listinfo/pygccxml-development
>
>
|