[Datetime-SIG] PEP 495 Q & A
ISAAC J SCHWABACHER
ischwabacher at wisc.edu
Tue Aug 25 21:56:38 CEST 2015
I like it. It's obvious from the field name what problem it solves, and which value of the flag corresponds to which instant in time.
________________________________________
From: Datetime-SIG <datetime-sig-bounces+ischwabacher=wisc.edu at python.org> on behalf of Carl Meyer <carl at oddbird.net>
Sent: Tuesday, August 25, 2015 14:48
To: Alexander Belopolsky
Cc: datetime-sig
Subject: Re: [Datetime-SIG] PEP 495 Q & A
On 08/25/2015 01:46 PM, Alexander Belopolsky wrote:
>
> On Tue, Aug 25, 2015 at 3:39 PM, Carl Meyer <carl at oddbird.net
> <mailto:carl at oddbird.net>> wrote:
>>
>> Another possible name for the flag/index just occurred to me: what about
>> `which`?
>
> That was in my very first proposal:
>
> """
> In other words, instead of localtime(dt, isdst=-1), we may want
> localtime(dt, which=0) where "which" is used to resolve the ambiguity:
> "which=0" means return the first (in UTC order) of the two times and
> "which=1" means return the second. (In the non-ambiguous cases "which" is
> ignored.)
> """ -- https://mail.python.org/pipermail/python-dev/2015-April/139099.html
>
> The name did not catch up.
Ha! Well in that case, consider this a vote of confidence in your
intuition -- I think it's the best of the options that have been discussed.
Carl
More information about the Datetime-SIG
mailing list