<HTML >
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">



<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Problem with filter()</TITLE>
</HEAD>
<BODY >
<DIV>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hey all,</FONT>

<BR>        <FONT SIZE=2 FACE="Arial">So I'm trying to filter a list with the built-in function filter(). My list looks something like this:</FONT>

<BR><FONT SIZE=2 FACE="Arial">['logs', 'rqp-8.2.104.0.dep', 'rqp-8.2.93.0.dep', 'rqp-win32-app-8.2.96.0-inst.tar.gz', 'rqp-win32-app-8.2.96.0-inst.tar.gz']</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Calling filter like this: compFiles = filter(is_Dev, compFiles)</FONT>

<BR><FONT SIZE=2 FACE="Arial">compFiles is my list and is_dev is the following </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">def is_Dev(stringy):</FONT>

<BR><FONT SIZE=2 FACE="Arial">  print stringy</FONT>

<BR><FONT SIZE=2 FACE="Arial">  stringx = stringy.split('-')</FONT>

<BR><FONT SIZE=2 FACE="Arial">  if stringx[1] == r'win32':</FONT>

<BR><FONT SIZE=2 FACE="Arial">    if stringx[2] == r'app':</FONT>

<BR><FONT SIZE=2 FACE="Arial">      if stringx[4] == r'dev.tar.gz':</FONT>

<BR><FONT SIZE=2 FACE="Arial">        return 1</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">For some reason I only get 'logs' printed when is_Dev is called. (ie. It's only going through is_dev once)</FONT>

<BR><FONT SIZE=2 FACE="Arial">Does anyone see something wrong that I'm not seeing??</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>
</P>

<P><FONT FACE="Lucida Calligraphy">Emile Boudreau</FONT>
</P>
<BR>

</DIV>
<DIV> </DIV>
<DIV>     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you. </DIV></BODY></HTML>