osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more pythonic way


Sorry I meant 
 

..

    def find_monthly_expenses(month=None, year=None):

        month = month or datetime.date.today().month

..
 

Or it should better be:

...

        if not month:

            month = datetime.date.today().month

..
 

Cheers,

Felix.

 
-- 
https://mail.python.org/mailman/listinfo/python-list