Path 1: 125 calls (1.0)

2004 (74) 2017 (26) 0 (25)

1 (12) 5 (12) 2 (11) 3 (10) 4 (10) 6 (10) 7 (10) 8 (10) 9 (10) 10 (10)

list (125)

1def monthdays2calendar(self, year, month):
2        """
3        Return a matrix representing a month's calendar.
4        Each row represents a week; week entries are
5        (day number, weekday number) tuples. Day numbers outside this month
6        are zero.
7        """
8        days = list(self.itermonthdays2(year, month))
9        return [ days[i:i+7] for i in range(0, len(days), 7) ]