obj[:3] is a slice of the time.struct_time object. The asterisk preceding the list returned by the slice expands the list into individual elements. Example:
>>> d = time.strptime('16/06/2010', '%d/%m/%Y')
>>> d
(2010, 6, 16, 0, 0, 0, 2, 167, -1)
>>> [d[0],d[1],d[2]]
[2010, 6, 16]
>>> datetime.date(d[0],d[1],d[2])
datetime.date(2010, 6, 16)
>>> datetime.date(*d[:3])
datetime.date(2010, 6, 16)
>>> d[:3]
(2010, 6, 16)
>>>
The DeprecationWarning you are seeing is unrelated to the code we are discussing, but originates in the pyXLWriter module. Warnings can be suppressed or turned into exceptions with a call to
filterwarnings(), which adds an entry to the warning filter. See Python documentation.