quick newbie syntax question

Robocop bthayre at physics.ucsd.edu
Mon Oct 20 15:08:38 EDT 2008


Is it possible to do something like this syntactically:

year = '2008'
month = '09'
limit = '31'
for i in range(1,limit):
  temp = Table.objects.filter(date = year'-'month'-'i)    <----screwed
up syntax
  ...do something with temp
return

I know that the syntax within the filter statement is wrong.  Is it
even possible to do something like that?  Any help is always
appreciated.



More information about the Python-list mailing list