datelib pythonification

alex goretoy agoretoy at gmail.com
Wed Mar 10 08:23:31 CET 2010


>>> import datelib
>>> datelib.datelib().dates_list()
[datetime.date(2009, 3, 10), datetime.date(2009, 4, 10), datetime.date(2009,
5, 10), datetime.date(2009, 6, 10), datetime.date(2009, 7, 10),
datetime.date(2009, 8, 10), datetime.date(2009, 9, 10), datetime.date(2009,
10, 10), datetime.date(2009, 11, 10), datetime.date(2009, 12, 10),
datetime.date(2010, 1, 10), datetime.date(2010, 2, 10), datetime.date(2010,
3, 10)]
>>> len(datelib.datelib().dates_list())
13
>>>
I know i can do this and untested below:

function dates_len(*targs, **dargs)
    return len(self.dates_list(*targs, **dargs))

Is this bloating the lib with unnecessary functions/methods?

-Alex Goretoy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100310/022ed77e/attachment.html>


More information about the Python-list mailing list