DateTime object

J

jf

Hi,

I've a bug in my code and I'm trying de reproduce it.

To trace the bug I print arguments, and it produces this:
{'date': <DateTime '20091020T00:00:00' at 558d128>}

My question is: what is: <DateTime '20091020T00:00:00' at 558d128>?

I use mx.DateTime put if I print it I get:
<mx.DateTime.DateTime object for '2010-10-29 13:13:25.55' at 7f0bb54e1298>

So what kind of object <DateTime> is ?

Thanks.
 
A

Adam Tauno Williams

Hi,
I've a bug in my code and I'm trying de reproduce it.
To trace the bug I print arguments, and it produces this:
{'date': <DateTime '20091020T00:00:00' at 558d128>}
My question is: what is: <DateTime '20091020T00:00:00' at 558d128>?
I use mx.DateTime put if I print it I get:
<mx.DateTime.DateTime object for '2010-10-29 13:13:25.55' at 7f0bb54e1298>
So what kind of object <DateTime> is ?

In this case it is clearly mx.DateTime.DateTime.

__repr__ and __str__ may produce different representations; so it can
just depend on how the 'representation' is being generated. If you
really want to know the type of an object: use type(x)

from datetime import datetime
x = datetime.now()
type(x)
<type 'datetime.datetime'>
 
J

jf

Le 29/10/2010 13:41, Adam Tauno Williams a écrit :
In this case it is clearly mx.DateTime.DateTime.

__repr__ and __str__ may produce different representations;

Thanks a lot, in fact it is DateTime from xmlrpclib but your post really
helped me to find it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top