CLN: Use generators in builtin functions (#19989) · harisbal/pandas@058a16c (original) (raw)
`@@ -57,7 +57,7 @@ _DEFAULT_DATETIME = datetime(1, 1, 1).replace(hour=0, minute=0,
`
57
57
``
58
58
`cdef object _TIMEPAT = re.compile(r'^([01]?[0-9]|2[0-3]):([0-5][0-9])')
`
59
59
``
60
``
`-
cdef set _not_datelike_strings = set(['a', 'A', 'm', 'M', 'p', 'P', 't', 'T'])
`
``
60
`+
cdef set _not_datelike_strings = {'a', 'A', 'm', 'M', 'p', 'P', 't', 'T'}
`
61
61
``
62
62
`NAT_SENTINEL = object()
`
63
63
`# This allows us to reference NaT without having to import it
`
`@@ -651,7 +651,7 @@ def _guess_datetime_format(dt_str, dayfirst=False, dt_str_parse=du_parse,
`
651
651
`break
`
652
652
``
653
653
`# Only consider it a valid guess if we have a year, month and day
`
654
``
`-
if len(set(['year', 'month', 'day']) & found_attrs) != 3:
`
``
654
`+
if len({'year', 'month', 'day'} & found_attrs) != 3:
`
655
655
`return None
`
656
656
``
657
657
` output_format = []
`