Lie Ryan wrote:
>> But this fails with:
>>
>> TypeError: can't set attributes of built-in/extension type
>> 'datetime.date'
> 
> This is because today is an attribute. In python, we can override
> attribute access to become a function call. I don't have python right
> now, but try this:
> 
> del date.today
> date.today = mytoday

It won't work. The datetime module is written in C. You can't modify a C
 extension.

Christian

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

Reply via email to