1. 28 Nis, 2006 1 kayıt (commit)
  2. 18 Nis, 2006 1 kayıt (commit)
  3. 14 Nis, 2006 1 kayıt (commit)
  4. 20 Mar, 2006 1 kayıt (commit)
  5. 27 Şub, 2006 1 kayıt (commit)
  6. 19 Şub, 2006 1 kayıt (commit)
  7. 15 Şub, 2006 1 kayıt (commit)
  8. 19 Ock, 2006 1 kayıt (commit)
  9. 10 Ara, 2005 1 kayıt (commit)
    • Jeremy Hylton's avatar
      Add const to several API functions that take char *. · af68c874
      Jeremy Hylton yazdı
      In C++, it's an error to pass a string literal to a char* function
      without a const_cast().  Rather than require every C++ extension
      module to put a cast around string literals, fix the API to state the
      const-ness.
      
      I focused on parts of the API where people usually pass literals:
      PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
      slots, etc.  Predictably, there were a large set of functions that
      needed to be fixed as a result of these changes.  The most pervasive
      change was to make the keyword args list passed to
      PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
      
      One cast was required as a result of the changes:  A type object
      mallocs the memory for its tp_doc slot and later frees it.
      PyTypeObject says that tp_doc is const char *; but if the type was
      created by type_new(), we know it is safe to cast to char *.
      af68c874
  10. 07 Kas, 2005 1 kayıt (commit)
  11. 13 Ock, 2005 1 kayıt (commit)
  12. 19 Ara, 2004 1 kayıt (commit)
  13. 16 Eyl, 2004 1 kayıt (commit)
  14. 20 Haz, 2004 2 kayıt (commit)
    • Tim Peters's avatar
      SF patch 876130: add C API to datetime module, from Anthony Tuininga. · 9ddf40b4
      Tim Peters yazdı
      The LaTeX is untested (well, so is the new API, for that matter).
      Note that I also changed NULL to get spelled consistently in concrete.tex.
      If that was a wrong thing to do, Fred should yell at me.
      9ddf40b4
    • Tim Peters's avatar
      Bug 975996: Add _PyTime_DoubleToTimet to C API · 1b6f7a90
      Tim Peters yazdı
      New include file timefuncs.h exports private API function
      _PyTime_DoubleToTimet() from timemodule.c.  timemodule should export
      some other functions too (look for painful bits in datetimemodule.c).
      
      Added insane-argument checking to datetime's assorted fromtimestamp()
      and utcfromtimestamp() methods.  Added insane-argument tests of these
      to test_datetime, and insane-argument tests for ctime(), localtime()
      and gmtime() to test_time.
      1b6f7a90
  15. 07 Haz, 2004 1 kayıt (commit)
  16. 21 Mar, 2004 1 kayıt (commit)
  17. 02 Mar, 2004 1 kayıt (commit)
  18. 20 Eki, 2003 1 kayıt (commit)
  19. 12 Eki, 2003 1 kayıt (commit)
  20. 27 Haz, 2003 1 kayıt (commit)
    • Raymond Hettinger's avatar
      SF bug #761337: datetime.strftime fails on trivial format string · f69d9f68
      Raymond Hettinger yazdı
      The interning of short strings violates the refcnt==1 assumption for
      _PyString_Resize().
      
      A simple fix is to boost the initial value of "totalnew" by 1.
      Combined with an NULL argument to PyString_FromStringAndSize(),
      this assures that resulting format string is not interned.
      This will remain true even if the implementation of
      PyString_FromStringAndSize() changes because only the uninitialized
      strings that can be interned are those of zero length.
      
      Added a test case.
      f69d9f68
  21. 18 May, 2003 1 kayıt (commit)
  22. 17 May, 2003 2 kayıt (commit)
  23. 16 May, 2003 2 kayıt (commit)
  24. 02 May, 2003 1 kayıt (commit)
  25. 14 Nis, 2003 1 kayıt (commit)
  26. 08 Şub, 2003 1 kayıt (commit)
  27. 07 Şub, 2003 1 kayıt (commit)
    • Tim Peters's avatar
      Comparison for timedelta, time, date and datetime objects: __eq__ and · 07534a60
      Tim Peters yazdı
      __ne__ no longer complain if they don't know how to compare to the other
      thing.  If no meaningful way to compare is known, saying "not equal" is
      sensible.  This allows things like
      
          if adatetime in some_sequence:
      and
          somedict[adatetime] = whatever
      
      to work as expected even if some_sequence contains non-datetime objects,
      or somedict non-datetime keys, because they only call __eq__.
      
      It still complains (raises TypeError) for mixed-type comparisons in
      contexts that require a total ordering, such as list.sort(), use as a
      key in a BTree-based data structure, and cmp().
      07534a60
  28. 04 Şub, 2003 1 kayıt (commit)
  29. 01 Şub, 2003 5 kayıt (commit)
  30. 31 Ock, 2003 2 kayıt (commit)
  31. 30 Ock, 2003 1 kayıt (commit)
  32. 24 Ock, 2003 1 kayıt (commit)
    • Tim Peters's avatar
      date and datetime comparison: when we don't know how to · 8d81a012
      Tim Peters yazdı
      compare against "the other" argument, we raise TypeError,
      in order to prevent comparison from falling back to the
      default (and worse than useless, in this case) comparison
      by object address.
      
      That's fine so far as it goes, but leaves no way for
      another date/datetime object to make itself comparable
      to our objects.  For example, it leaves Marc-Andre no way
      to teach mxDateTime dates how to compare against Python
      dates.
      
      Discussion on Python-Dev raised a number of impractical
      ideas, and the simple one implemented here:  when we don't
      know how to compare against "the other" argument, we raise
      TypeError *unless* the other object has a timetuple attr.
      In that case, we return NotImplemented instead, and Python
      will give the other object a shot at handling the
      comparison then.
      
      Note that comparisons of time and timedelta objects still
      suffer the original problem, though.
      8d81a012