Greg Ewing wrote:
> [EMAIL PROTECTED] wrote:
>> I was just thinking about the folks at places like FermiLab and CERN. ;-)
>
> Those guys probably need picoseconds...
With the suggested %f format character and the mention of Fermilab and
CERN, I started thinking about femtoseconds :)
Cheers,
Nic
[EMAIL PROTECTED] wrote:
> I was just thinking about the folks at places like FermiLab and CERN. ;-)
Those guys probably need picoseconds...
--
Greg
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
> Given how long strftime has been around I think %f is fine. We may
> even influence the future of the C library. :-)
Patch for datetime (py3k only at this point, no tests either) here:
http://bugs.python.org/issue1158
Skip
___
Python-3000 mailing
Guido> Which ones are two letters?
All the locale-specific stuff on Solaris 10. I guess technically the first
letter of the pair is a modifier of the actual code, which comes next. From
the man page:
Modified Conversion Specifications
Some conversion specifications can be modified b
On 9/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> So, is '%f" okay to coopt? Is there some sort of future-proofing we can do
> so that if the libc folks decide later to use "%f" for something we're not
> (mildly) hosed? Maybe "%."? It appears that all strftime codes are one or
> two let
Guido> No, the datetime module is explicitly defined to use
Guido> microseconds. I don't expect there to be a practical use for
Guido> nanoseconds (even microseconds are doubtful, but useful since one
Guido> might want unique timestamps for more than 1000 events per
Guido> seco
On 9/11/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > I don't expect there to be a practical use for nanoseconds (even
> > microseconds are doubtful, but useful since one might want unique
> > timestamps for more than 1000 events per second).
>
> But... what if you want un
Guido van Rossum wrote:
> I don't expect there to be a practical use for nanoseconds (even
> microseconds are doubtful, but useful since one might want unique
> timestamps for more than 1000 events per second).
But... what if you want unique timestamps for more
than 100 events per second? :-)
On 9/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Skip> I would like to see an analog to %S which preserves fractions of a
> Skip> second as the default formatting for time and datetime objects
> Skip> does:
>
> Skip> >>> print(now)
> Skip> 2007-09-10 22:07:53.654774
Skip> I would like to see an analog to %S which preserves fractions of a
Skip> second as the default formatting for time and datetime objects
Skip> does:
Skip> >>> print(now)
Skip> 2007-09-10 22:07:53.654774
Guido> Right. It's odd that there's nothing explicit that exactl
Nick Coghlan wrote:
> Eric Smith wrote:
>> Eric Smith wrote:
>>> I have a patch to add __format__ to datetime.time, .date, and
>>> .datetime. For non-empty format_spec's, I just pass on to
>>> .strftime. For empty format_spec's, it returns str(self).
>>
>> What's the best way to call str(self)
Eric Smith wrote:
> Eric Smith wrote:
>> I have a patch to add __format__ to datetime.time, .date, and .datetime.
>> For non-empty format_spec's, I just pass on to .strftime. For empty
>> format_spec's, it returns str(self).
>
> What's the best way to call str(self)?
>
> I'm currently doing:
Eric Smith wrote:
> I have a patch to add __format__ to datetime.time, .date, and .datetime.
> For non-empty format_spec's, I just pass on to .strftime. For empty
> format_spec's, it returns str(self).
What's the best way to call str(self)?
I'm currently doing:
if (PyUnicode_GetSize(for
Right. It's odd that there's nothing explicit that exactly produces
the default. (Though floats have this issue too -- I wish it could be
fixed there too.)
On 9/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Paul> The date and time defaults (which appear to be %Y-%m-%d and
> Paul>
Paul> The date and time defaults (which appear to be %Y-%m-%d and
Paul> %H:%M:%s) seem perfectly acceptable, on the other hand.
I would like to see an analog to %S which preserves fractions of a second as
the default formatting for time and datetime objects does:
>>> print(now)
2
Paul Moore wrote:
> I'd like to see the default format specified (somewhere). I note that
> the default format for datetime values seems to differ for me (on
> 3.0a1 on Windows)
>
> Python 3.0a1 (py3k:57844, Aug 31 2007, 16:54:27) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "help", "copyright",
On 9/10/07, Eric Smith <[EMAIL PROTECTED]> wrote:
> I have a patch to add __format__ to datetime.time, .date, and .datetime.
> For non-empty format_spec's, I just pass on to .strftime. For empty
> format_spec's, it returns str(self).
>
> I think this is the only reasonable interpretation of form
Eric Smith wrote:
> Martin v. Löwis wrote:
>>> I have a patch to add __format__ to datetime.time, .date, and .datetime.
>>> For non-empty format_spec's, I just pass on to .strftime. For empty
>>> format_spec's, it returns str(self).
>>>
>>> I think this is the only reasonable interpretation of
On 10/09/2007, Eric Smith <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis wrote:
> >> I have a patch to add __format__ to datetime.time, .date, and .datetime.
> >> For non-empty format_spec's, I just pass on to .strftime. For empty
> >> format_spec's, it returns str(self).
> >>
> >> I think this is
Martin v. Löwis wrote:
>> I have a patch to add __format__ to datetime.time, .date, and .datetime.
>> For non-empty format_spec's, I just pass on to .strftime. For empty
>> format_spec's, it returns str(self).
>>
>> I think this is the only reasonable interpretation of format_spec's for
>> da
> I have a patch to add __format__ to datetime.time, .date, and .datetime.
> For non-empty format_spec's, I just pass on to .strftime. For empty
> format_spec's, it returns str(self).
>
> I think this is the only reasonable interpretation of format_spec's for
> datetime. Does anyone think o
I have a patch to add __format__ to datetime.time, .date, and .datetime.
For non-empty format_spec's, I just pass on to .strftime. For empty
format_spec's, it returns str(self).
I think this is the only reasonable interpretation of format_spec's for
datetime. Does anyone think otherwise?
E
22 matches
Mail list logo