[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

/ cpython Public

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). #4079

Merged
merged 4 commits into from Oct 24, 2017

Conversation

Copy link
Member

abalkin commented Oct 23, 2017

Calendar.itermonthdates() will now consistently raise an exception when a date falls outside of the 0001-01-01 through 9999-12-31 range. To support applications that cannot tolerate such exceptions, the new methods itermonthdays3() and itermonthdays4() are added. The new methods return tuples and are not restricted by the range supported by datetime.date.

Thanks @serhiy-storchaka for suggesting the itermonthdays4() method and for the review.

https://bugs.python.org/issue28292

abalkin changed the title Implemented Calendar.itermonthdays3() and itermonthdays4(). Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). Oct 23, 2017
abalkin self-assigned this Oct 23, 2017
Copy link
Member

serhiy-storchaka left a comment

LGTM, but needs a documentation.

Lib/calendar.py Outdated
@@ -180,6 +186,32 @@ def itermonthdays2(self, year, month):
for i, d in enumerate(self.itermonthdays(year, month), self.firstweekday):
yield d, i % 7

def itermonthdays3(self, year, month):
Copy link
Member

serhiy-storchaka Oct 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of methods: itermonthdays2, itermonthdays3, itermonthdays4, itermonthdays looks slightly inconsistent.

abalkin merged commit fdd9b21 into python:master Oct 24, 2017
3 checks passed
abalkin deleted the issue-28292 branch Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants