Difference Between Two datetimes

W. eWatson wolftracks at invalid.com
Mon Dec 28 20:20:28 EST 2009


Steven D'Aprano wrote:
> On Mon, 28 Dec 2009 23:50:30 +1100, Ben Finney wrote:
> 
>>> How does one "unload" this structure to get the seconds and days?
>> It's customary to consult the documentation for questions like that
>> <URL:http://docs.python.org/library/datetime.html#datetime.timedelta>.
> 
> No no no, it's customary to annoy everyone on the list by asking the 
> question *without* consulting the documentation, and then to be told to 
> Read The Fine Manual.
> 
> To be serious for a moment, if you're in the interactive interpreter, you 
> can get some useful information by calling help(datetime.timedelta).
> 
Yes, thanks. I'm starting to catch on to the idea there are tools like 
dir, help, doc sources, and ___dcc__ that can help. It doesn't seem to 
be standard practice to more or less teach the environment that Python 
is in. If they do, it's jumbled around. Most books start with Python 
itself and skirt the issues of the environment and interaction. Oddly, 
today I found a source that gets right into these concepts. It may have 
something to do with MIT. Here's a link to one of the three section of 
the reference 
<http://docs.google.com/leaf?id=0B2oiI2reHOh4ZTFkY2ZmYzktZTVkZS00M2E1LTgwNDUtYWRjZTE1Nzc2ZDYz&sort=name&layout=list&pid=0B2oiI2reHOh4ZGVmNjk3MjgtZmY5YS00ZWQxLThkNWMtZmJkMmU1MWM1OTcx&cindex=2>. 


BTW, I had looked at some Python doc that seems to be apart from the 
reference above. So I'm not entirely remiss on this. I do look first. 
However, on the other hand, regarding the reference, 29 pages is a bit 
steep for any document.



More information about the Python-list mailing list