[C++-sig] (no subject)

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Jan 8 04:16:38 CET 2003

--- David Sankel <camio at yahoo.com> wrote:
> from embedded_Filter import *
> class SpecificFilter( Filter ):
>   def name( self ):
>     return 'SpecificFilterA'
>   def doFilter( self, result ):
>     print("In SpecificFilter.doFilter\n")
>     print( len( self.data ) ) ; #self.data is a normal
> python list
>     print( len( result ) );     #So is result
>     p = [x.clone() for x in self.data] #The members of
> self.data can
>                                         #have their
> methods called
>     result = p       #result can be modified as a
> python list
>     result.reverse() #another modification to result.

Can you explain in more detail what you expect the doFilter() method to do? Do
you want to modify result? Note that

result = p

Only replaces a reference inside the function. I.e. the caller will not see any
changes to the object passed in as "result". Unless I am missing something.


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the Cplusplus-sig mailing list