Skip to content

Add missing methods to Python Date/Time/Delta objects

Karl-Hermann Wieners requested to merge feature-add-missing-python-methods into master

In the mtime Python module, methods to query the underlying fields like year, month etc. from the container classes was missing (except for an items method in TimeDelta)

  1. all classes now expose the fields defined by the ctypes binding
  2. the test_python script has been extended/re-structured to allow for the large number of new test cases
  3. during testing a mismatch between the C struct and the binding for TimeDelta was found and fixed. The missing field had shadowed the sign field.
  4. in my understanding, the missing TimeDelta field flag_std_form is for internal use, so it is mapped to _flag_std_form and suppressed in the items() iterator

Merge request reports

Loading