[Tim Peters]
>> ...
>> Maybe we could introduce "%" as a unary prefix operator, where
>> %x means "the fractional part of x" ;-)
[Anders J. Munch]
> What'ya talking about? Obviously it should be a suffix operator ;-)
Na -- that would be confusing ;-)
...
>> time.sleep(1.0 - math.fmod(now,
[Armin Rigo]
>> Thanks for the clarification. Yes, it makes sense that __mod__,
>> __divmod__ and __floordiv__ on float and decimal would eventually follow
>> the same path as for complex (where they make even less sense and
>> already raise a DeprecationWarning).
[Nick Maclaren]
> Yes. Though t
...
[Tim]
>> fractional part of x == fmod(x, 1.0) == modf(x)[0], so you could use
>> either.
[Anders J. Munch]
> Actually, on the off chance that time.time() is negative, he can use
> neither. It has to be math.ceil, float.__mod__ or divmod.
If time.time() is negative, I expect this would be th
[Armin]
> Thanks for the clarification. Yes, it makes sense that __mod__,
> __divmod__ and __floordiv__ on float and decimal would eventually follow
> the same path as for complex (where they make even less sense and
> already raise a DeprecationWarning).
This truly has nothing to do with complex
[Guido]
> ...
> I don't care about the speed, but having to import math (which I
> otherwise almost never need) is a distraction, and (perhaps more so) I
> can never remember whether it's modf() or fmod() that I want.
fractional part of x == fmod(x, 1.0) == modf(x)[0], so you could use
either. Si
On 1/25/07, Tim Peters <[EMAIL PROTECTED]> wrote:
> [Guido]
> > The only thing I would miss about this is that I am used to write
> > certain timing loops that like to sync on whole seconds, by taking
> > time.time() % 1.0 which nicely gives me the milliseconds in the
> > current second. E.g.
> >
>
I've heard it claimed that men often have this problem.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On 1/25/07, Tim Peters <[EMAIL PROTECTED]> wrote:
> [Brett Cannon]
> > I am trying to commit to the 2.5 branch and I am getting an error:
> >
> > svn: Commit failed (details follow):
> > svn: Can't create directory
> > '/data/repos/projects/db/transactions/53566-1.txn': Permission denied
> >
> > An
[Guido]
> The only thing I would miss about this is that I am used to write
> certain timing loops that like to sync on whole seconds, by taking
> time.time() % 1.0 which nicely gives me the milliseconds in the
> current second. E.g.
>
> while True:
> do_something_expensive_once_a_second_on_the_s
Brett Cannon schrieb:
> I am trying to commit to the 2.5 branch and I am getting an error:
>
> svn: Commit failed (details follow):
> svn: Can't create directory
> '/data/repos/projects/db/transactions/53566-1.txn': Permission denied
>
> Anyone know what is going on?
It's not clear to me. The pe
[Brett Cannon]
> I am trying to commit to the 2.5 branch and I am getting an error:
>
> svn: Commit failed (details follow):
> svn: Can't create directory
> '/data/repos/projects/db/transactions/53566-1.txn': Permission denied
>
> Anyone know what is going on?
Did you do `svn info` in that directo
I am trying to commit to the 2.5 branch and I am getting an error:
svn: Commit failed (details follow):
svn: Can't create directory
'/data/repos/projects/db/transactions/53566-1.txn': Permission denied
Anyone know what is going on?
-Brett
___
Python-De
The only thing I would miss about this is that I am used to write
certain timing loops that like to sync on whole seconds, by taking
time.time() % 1.0 which nicely gives me the milliseconds in the
current second. E.g.
while True:
do_something_expensive_once_a_second_on_the_second()
now = time.
On 1/24/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
Gustavo Carneiro schrieb:
>What about http://www.python.org/sf/1564547 ? It tries to solve a
> different problem, but I think it also fixes this one; at least as much
> as possible with the braindead unix signal programming interface.
Armin Rigo <[EMAIL PROTECTED]> wrote:
>
> Thanks for the clarification. Yes, it makes sense that __mod__,
> __divmod__ and __floordiv__ on float and decimal would eventually follow
> the same path as for complex (where they make even less sense and
> already raise a DeprecationWarning).
Yes. Tho
Hi Tim,
On Tue, Jan 23, 2007 at 05:14:29PM -0500, Tim Peters wrote:
> For some reason `decimal` implemented __mod__ as the proposed
> standard's "remainder" operation. That's the immediate source of your
> surprise. IMO `decimal` should not have implemented __mod__ at all,
> as Python's number-t
16 matches
Mail list logo