Path 1: 1928 calls (0.84)

1 (64) 2 (64) 3 (64) 4 (64) 5 (64) 6 (64) 7 (64) 8 (63) 9 (63) 10 (63)

3 (278) 4 (278) 5 (277) 6 (275) 1 (274) 0 (273) 2 (273)

2 (1921) 1 (7)

' 1' (64) ' 2' (64) ' 3' (64) ' 4' (64) ' 5' (64) ' 6' (64) ' 7' (64) ' 8' (63) ' 9' (63) '10' (63)

1def formatday(self, day, weekday, width):
2        """
3        Returns a formatted day.
4        """
5        if day == 0:
6            s = ''
7        else:
8            s = '%2i' % day             # right-align single-digit days
9        return s.center(width)
            

Path 2: 368 calls (0.16)

0 (368)

0 (55) 2 (55) 1 (54) 6 (53) 5 (51) 3 (50) 4 (50)

2 (368)

' ' (368)

1def formatday(self, day, weekday, width):
2        """
3        Returns a formatted day.
4        """
5        if day == 0:
6            s = ''
7        else:
8            s = '%2i' % day             # right-align single-digit days
9        return s.center(width)