John Machin wrote: > Bruno Desthuilliers wrote: > >>John Machin wrote: >> >>>Bruno Desthuilliers wrote: >> >>>Which pieces of the following seem to be working to you? >> >>John, it seems you failed to notice the use of "may" and "seems" in my >>post. IIRC, both are supposed to strongly suggest a lack of certitude. >> > > I didn't fail to notice that you were seeming. Re-read my question: > It's asking you which bits you were seeming.
OP problem: age = (date.today() - born).year Possible solution: import mx.DateTime as dt def age(date): return dt.Age(dt.today(), date).years born = dt.Date(1967, 5, 1) assert age(born) == 39 -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list