[C++-sig] Bugs with Pyste and vector_indexing_suite.

Nicodemus nicodemus at globalite.com.br
Fri Aug 22 15:24:59 CEST 2003


(Sorry if this post appears twice: I post the first message two days 
ago, and still didn't see it get to the list)

Hi Prabhu!

Prabhu Ramachandran wrote:

>Hi,
>
>Three bugs.
>
>
>  2. Pyste from CVS has problems I have not had the time to track it
>     down and reduce it to a small problem but the problem is with the
>     declarations.py.  Some of the methods do not appear to have the
>     'throws' attribute.  I get errors like this:
>
><snip traceback>
>  File "./declarations.py", line 213, in Exceptions
>AttributeError: 'Method' object has no attribute 'throws'
>
>    I quietly fixed them (without looking for the cause) by changing
>    this in declarations.py:
>
>     212     def Exceptions(self):
>     213         if self.throws is None:
>     214             return ""
>
>    to:
>   
>     212     def Exceptions(self):
>     213         if not hasattr(self, 'throws') or self.throws is None:
>     214             return ""
>  
>

Looking at the sources, I can't figure out how that is possible, since
Method is derived from Function, which in turn creates a instance
attribute named "throws", with the value None, and Method calls Function
constructor. But I think your problem is related to the cache: you
probably pickled an old instance, without this attribute (the "throw"
declaration support has been recently added, thanks to a patch by
Gottfried! 8) ), and pickled objects are not initialized via __init__.
Try to rebuild your cache and see if the problem goes away. 8)


>  3. Pyste also has problems with Include and Import used together.  I
>     again don't have a small test case but perhaps Nicodemus will be
>     able to figure this one out.  Essentially if I add an
>     Include(...) after an Import(...) nothing gets included.  However
>     if I place the Include before the Import, everything seems to
>     work OK.
>  
>

Unfortunately, I couldn't reproduce this... placing Include before or
after an Import works fine in my tests. When you have time, could you
please produce a small test case, or perhaps explain the problem in more
detail?

>Thanks and sorry for the lack of specific test cases.  I'm really
>short on time now.
>  
>
No problem, that's understandable. Thanks to take your time to report
this problems! 8)

Regards,
Nicodemus.






More information about the Cplusplus-sig mailing list