using the filter function within class return error

david.katkowski at ddiworld.com david.katkowski at ddiworld.com
Fri Nov 2 12:42:17 EDT 2007


I'm trying to use the __builtin__ filter function within a class;
however, I receive the following error:

NameError: global name 'MajEthnic' is not defined

The line of code is: EthMaj = filter(self.MajEthnic,flist)

So, I'm trying to use the MajEthnic function to filter the list flist.
Any ideas?

Thanks!




More information about the Python-list mailing list