This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients SilentGhost, belopolsky
Date 2016-08-01.16:02:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470067374.05.0.792411898825.issue27661@psf.upfronthosting.co.za>
In-reply-to
Content
From review comments:

Lib/datetime.py:1482: def combine(cls, date, time, tzinfo=True):
On 2016/08/01 12:23:12, berkerpeksag wrote:
> On 2016/08/01 08:47:14, SilentGhost wrote:
> > This strikes me as an odd default value, why not use a more conventional
None?
> 
> Agreed. It would also be good to make it keyword-only.

tzinfo is not kw-only in the other constructors and I don't think it should be here.  Unlike "fold", tzinfo value is usually recognizable at the call site.  It is either called something like "tzinfo", "tz" or "New_York" or is a call such as 'tz.get('US/Eastern').

I would always prefer datetime.combine(d, t, tzinfo) to  datetime.combine(d, t, tzinfo=tzinfo).  datetime.combine(d, t, New_York) vs. datetime.combine(d, t, tzinfo=New_York) is a closer call, but still the first form is readable enough.


See <http://bugs.python.org/review/27661/diff/18026/Lib/datetime.py#newcode1482>.
History
Date User Action Args
2016-08-01 16:02:54belopolskysetrecipients: + belopolsky, SilentGhost
2016-08-01 16:02:54belopolskysetmessageid: <1470067374.05.0.792411898825.issue27661@psf.upfronthosting.co.za>
2016-08-01 16:02:54belopolskylinkissue27661 messages
2016-08-01 16:02:53belopolskycreate