Datetime question

Simon Brunning simon at brunningonline.net
Thu Aug 3 10:34:15 EDT 2006


On 8/3/06, Rama <ramasubramani.g at gmail.com> wrote:
> Just curious why when
> I call id(a) I get the same id after I call the replace method.

In your example, you called a's replace() method, but did nothing with
the new datetime object that it returned. The original object, a,
naturally still has the same ID, but it also still has the same value.

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list