New submission from Alexander Belopolsky:

The Calendar.itermonthdates() method is defined as follows:

"Return an iterator for one month. The iterator will yield datetime.date values 
and will always iterate through complete weeks, so it will yield dates outside 
the specified month."

However, for the two months at the extremes of datetime.date range, 0001-01 and 
9999-12, the dates outside the specified month may not be representable as 
datetime.date instances.

The current implementation is inconsistent: itermonthdates(1, 1) may raise an 
OverflowError (see #26650), while itermonthdates(9999, 12) may yield an 
incomplete week (see #28253.)

This issue supersedes #26650 and #28253.

----------
assignee: belopolsky
messages: 277577
nosy: belopolsky, jiangping.li, rhettinger, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: test needed
status: open
title: Make Calendar.itermonthdates() behave consistently in edge cases
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to