Hey all,
So I'm trying to filter a list with the built-in function
filter(). My list looks something like this:
['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']
Calling filter like this: compFiles =
and i know it
shouldn't be.
Emile Boudreau
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Boudreau, Emile
Sent: Tuesday, April 03, 2007 10:52 AM
To: python-list@python.org
Subject: Problem with filter()
Hey all,
So I'm trying to filter
On 4/3/07, Boudreau, Emile [EMAIL PROTECTED] wrote:
Sorry folks my mistake def is_dev should be:
def is_Dev(stringy):
stringx = stringy.split('-')
if stringx[0] == '':
if stringx[1] == r'win32':
if stringx[2] == r'app':
if stringx[4] == r'dev.tar.gz':
return
Sorry folks my mistake def is_dev should be:
def is_Dev(stringy):
stringx = stringy.split('-')
if stringx[0] == '':
if stringx[1] == r'win32':
if stringx[2] == r'app':
if stringx[4] == r'dev.tar.gz':
return 1
But now the results of the filter is an empty list
Boudreau, Emile wrote:
Hey all,
So I'm trying to filter a list with the built-in function
filter(). My list looks something like this:
['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']
Calling filter like