Path 1: 200 calls (1.0)

2004 (88) 2017 (27) 0 (25) 1 (14) 9999 (14) 1995 (2) 1987 (2) 1988 (2) 1999 (2) 1923 (2)

12 (37) 1 (27) 2 (25) 4 (21) 5 (13) 3 (11) 6 (11) 7 (11) 8 (11) 9 (11)

0 (1172) 1 (200) 2 (200) 3 (200) 4 (200) 5 (200) 6 (200) 7 (200) 8 (200) 9 (200)

1def itermonthdays(self, year, month):
2        """
3        Like itermonthdates(), but will yield day numbers. For days outside
4        the specified month the day number is 0.
5        """
6        day1, ndays = monthrange(year, month)
7        days_before = (day1 - self.firstweekday) % 7
8        yield from repeat(0, days_before)
9        yield from range(1, ndays + 1)
10        days_after = (self.firstweekday - day1 - ndays) % 7
11        yield from repeat(0, days_after)