On Sun, 28 Aug 2005 23:27:07 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>I suspect that PyPy, when further alone, will make it easier to do things
>like develop a customized interpreter that has alternate definitions for
>builtin operators. So maybe the OP should ask again in a year or two
Iain King wrote:
> Robert Kern wrote:
>>You have silly users.
>
> You mean you don't? Damn. Can I have some of yours?
No, you may not. Mine! All mine!
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard H
Robert Kern wrote:
> Shaun wrote:
> > Thanks for your replies, obviously this isn't a simple thing to do so
> > I'll take a different tack.
> >
> > The exact problem I am trying to solve here is to avoid the
> > ZeroDivisionError in division.
> > I have c++ code which delegates to python to calcul
I suspect that PyPy, when further alone, will make it easier to do things
like develop a customized interpreter that has alternate definitions for
builtin operators. So maybe the OP should ask again in a year or two.
TJR
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 28 Aug 2005 04:09:10 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
[... a response to the OP's apparent desire to "overload the divide operator"
with a call
to his safediv function ...]
The part that rewrote the the AugAssign could only work for plain name
Augassign targets, so
I introd
On Thu, 25 Aug 2005 16:12:20 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]>
wrote:
>Shaun wrote:
>> Hi,
>>
>> I'm trying to overload the divide operator in python for basic arithmetic.
>> eg. 10/2 ... no classes involved.
>>
>> I am attempting to redefine operator.__div__ as follows:
>>
>>
Shaun wrote:
> Thanks for your replies, obviously this isn't a simple thing to do so
> I'll take a different tack.
>
> The exact problem I am trying to solve here is to avoid the
> ZeroDivisionError in division.
> I have c++ code which delegates to python to calculate expressions on
> table cells.
Thanks for your replies, obviously this isn't a simple thing to do so
I'll take a different tack.
The exact problem I am trying to solve here is to avoid the
ZeroDivisionError in division.
I have c++ code which delegates to python to calculate expressions on
table cells. The values of the table ce
On Thu, 25 Aug 2005 16:12:20 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]>
wrote:
>Shaun wrote:
>> Hi,
>>
>> I'm trying to overload the divide operator in python for basic arithmetic.
>> eg. 10/2 ... no classes involved.
>>
>> I am attempting to redefine operator.__div__ as follows:
>>
>>
Shaun wrote:
> Hi,
>
> I'm trying to overload the divide operator in python for basic arithmetic.
> eg. 10/2 ... no classes involved.
>
> I am attempting to redefine operator.__div__ as follows:
>
> # my divide function
> def safediv(a,b):
> return ...
>
> # reassign bui
Shaun wrote:
> Hi,
>
> I'm trying to overload the divide operator in python for basic arithmetic.
> eg. 10/2 ... no classes involved.
>
> I am attempting to redefine operator.__div__ as follows:
>
> # my divide function
> def safediv(a,b):
> return ...
>
> # reassign bui
Hi,
I'm trying to overload the divide operator in python for basic arithmetic.
eg. 10/2 ... no classes involved.
I am attempting to redefine operator.__div__ as follows:
# my divide function
def safediv(a,b):
return ...
# reassign buildin __div__
import operator
12 matches
Mail list logo