[Python-checkins] python/nondist/sandbox/datetime doc.txt,1.31,1.32

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sun, 08 Dec 2002 17:35:49 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv27451

Modified Files:
	doc.txt 
Log Message:
Added TODO/OPEN and C API sections.


Index: doc.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/doc.txt,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** doc.txt	8 Dec 2002 19:21:32 -0000	1.31
--- doc.txt	9 Dec 2002 01:35:47 -0000	1.32
***************
*** 1,2 ****
--- 1,44 ----
+ TODO/OPEN
+ =========
+ - datetimetz needs a C implementation.
+ 
+ - timetz needs a C implementation.
+ 
+ - Behavior in Boolean contexts.  Currently time(0) and timedelta(0) act
+   as false, everything else acts true.  Is this desired?  timedelta(0)
+   seems reasonable since it's very number-like, but time(0) acting false
+   bothers me (midnight isn't especially more zero-like than noon).
+ 
+ - What should str() do?  It generally acts like a synonym for isoformat()
+   now.  But
+ 
+     >>> print time(2)
+     02:00:00.000000
+     >>>
+ 
+   is arguably better as '2:00:00' or even '2:00'.  The Python
+   implementation has (overridden) "pretty __str__" according to one
+   person's idea of "pretty", for a couple types.  Rat hole.
+ 
+ - The METH_CLASS bug affects about a dozen functions here.  They'll need
+   to be recoded in minor ways when the bug gets fixed.  The bug needs to
+   be fixed.
+ 
+ - pickles still "feel too big".
+ 
+ - Subclass relationships.  Currently datetime is a subclass of date.
+   I like this in practice, and think it's theoretically sound too.
+   Should this be blessed?  I expect the same questions to pop up for
+   timetz wrt time, and datetimetz wrt datetime.
+ 
+ - The type objects aren't exposed, due to headaches with DLL/.so.
+ 
+ - LaTeXize the docs.
+ 
+ - Move from sandbox to mainline.
+ 
+ 
+ Docs
+ ====
  The datetime module supplies a number of classes for manipulating dates
  and times, in both simple and complex ways.
***************
*** 589,590 ****
--- 631,664 ----
  class timetz
  ============
+ 
+ 
+ C API
+ =====
+ Struct typedefs:
+ 
+     PyDateTime_Date
+     PyDateTime_DateTime
+     PyDateTime_Time
+     PyDateTime_Delta
+ 
+ Accessor macros:
+ 
+ All objects are immutable, so accessors are read-only.  All macros
+ return ints:
+ 
+     For date instances:
+         PyDateTime_GET_YEAR(o)
+         PyDateTime_GET_MONTH(o)
+         PyDateTime_GET_DAY(o)
+ 
+     Ror datetime and date instances:
+         PyDateTime_DATE_GET_HOUR(o)
+         PyDateTime_DATE_GET_MINUTE(o)
+         PyDateTime_DATE_GET_SECOND(o)
+         PyDateTime_DATE_GET_MICROSECOND(o)
+ 
+     For time instances:
+         PyDateTime_TIME_GET_HOUR(o)
+         PyDateTime_TIME_GET_MINUTE(o)
+         PyDateTime_TIME_GET_SECOND(o)
+         PyDateTime_TIME_GET_MICROSECOND(o)