circuitpython/shared-bindings/time
Jeff Epler e188ae8b23 time: struct_time: allow construction like a namedtuple, too
Whenever there is more than one argument, delegate the operation to
namedtuple_make_new.  This allows other circuitpython-compatible
idioms, like with keywords
    time.struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=0,
        tm_min=0, tm_sec=14, tm_wday=5, tm_yday=5, tm_isdst=-1)
with 9 positional arguments, etc.

The only vaguely plausible CPython behavior still not permitted in
CircuitPython that I found is constructing a timetuple from a length-9
list, a la
    time.struct_time(list(time.localtime())

Even better, by getting rid of an error message, the build shrinks a
tiny bit.
2019-11-26 08:45:44 -06:00
..
__init__.c time: struct_time: allow construction like a namedtuple, too 2019-11-26 08:45:44 -06:00
__init__.h Add rtc module 2018-04-16 12:49:10 +02:00