% is not an operator [was Re: Verbose and flexible args and kwargs syntax]

Chris Angelico rosuav at gmail.com
Wed Dec 14 08:39:07 EST 2011


On Thu, Dec 15, 2011 at 12:29 AM, Eelco <hoogendoorn.eelco at gmail.com> wrote:
> On Dec 14, 1:38 pm, Steven D'Aprano <steve
> +comp.lang.pyt... at pearwood.info> wrote:
>> That would be:
>>
>> >>> divmod(17, 5)
>>
>> (3, 2)
>
> Cool; if only it were in the math module id be totally happy.

That's easily solved.

import math
math.divmod=divmod
del __builtins__.divmod

:)

ChrisA



More information about the Python-list mailing list