more pythonic way

Felix Lazaro Carbonell felix at epepm.cupet.cu
Mon Feb 11 14:46:05 EST 2019


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




More information about the Python-list mailing list