[Python-ideas] Re: Calendar.year()

2019-11-28 Thread Wes Turner
IDK that a DeprecationWarning would be helpful or necessary? https://github.com/python/cpython/blob/02519f75d15b063914a11351da30178ca4ceb54b/Lib/calendar.py#L625 : ```python monthcalendar = c.monthdayscalendar prweek = c.prweek week = c.formatweek weekheader = c.formatweekheader prmonth = c.prmon

[Python-ideas] Re: Calendar.year()

2019-11-27 Thread Serhiy Storchaka
Abdur-Rahmaan Janhangeer Wrote in message:r > Greetings list,In the calendar module, i find it terribly unintuitive to have > a calendar.month but not a calendar.year, the default being > calendar.calendarSuggestion: replace calendar.calendar by > calendar.yearYours,Abdur-Rahmaan Janhangeerpyth

[Python-ideas] Re: Calendar.year()

2019-11-27 Thread Kyle Stanley
> Replacing it would break backward compatibility. But adding a year function as an alias for calendar wouldn’t. And you could note in > the docs that year is preferred for new code, or even deprecate the old name over a few versions if it seems worth it. > What about prcal (as opposed to pryear)

[Python-ideas] Re: Calendar.year()

2019-11-27 Thread Andrew Barnert via Python-ideas
On Nov 27, 2019, at 12:39, Abdur-Rahmaan Janhangeer wrote: > > > In the calendar module, i find it terribly unintuitive to have a > calendar.month but not a calendar.year, the default being calendar.calendar > > Suggestion: replace calendar.calendar by calendar.year Replacing it would break