Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-20 Thread Christian Heimes
Ondrej Certik wrote: > Are we able to provide an actual patch to Python that implements this? > If so, then I am. > Imho the proposal should come with an actual patch, otherwise it's > difficult to judge it. Your better off with writing a PEP first. In order to implement the proposal you've to ma

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Travis Vaught
On Aug 18, 2008, at 6:57 PM, Andrew Dalke wrote: > ... > > BTW, it's *fun* to modify an existing language and > afterwards it you know a secret - that programming > languages are just flimsy facades held together by > a shared hallucination. Like in a dream, change > things too much or leave gaps

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Scott Ransom
On Tue, Aug 19, 2008 at 01:57:20AM +0200, Andrew Dalke wrote: > BTW, it's *fun* to modify an existing language and > afterwards it you know a secret - that programming > languages are just flimsy facades held together by > a shared hallucination. Like in a dream, change > things too much or leave

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 19, 2008, at 1:06 AM, Christian Heimes wrote: > [long posting] > > Oh h... what have I done ... *g* *shrug* I write long emails. I've been told that by several people. It's probably a bad thing. > The ideas needs a good PEP. You are definitely up to something. You > also > came up wit

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
On Tue, Aug 19, 2008 at 1:06 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Andrew Dalke wrote: >> When would this "with float ... " considered valid? > > [long posting] > > Oh h... what have I done ... *g* > > Slow down, please. For now there are no concrete plans what-so-ever to > implement th

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Christian Heimes
Andrew Dalke wrote: > When would this "with float ... " considered valid? [long posting] Oh h... what have I done ... *g* Slow down, please. For now there are no concrete plans what-so-ever to implement the feature in the near future. Some developers have expressed their interest in a way to a

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Dag Sverre Seljebotn
Ondrej Certik wrote: > Hi Christian, > > On Mon, Aug 18, 2008 at 11:22 PM, Christian Heimes <[EMAIL PROTECTED]> > wrote: >> Ondrej Certik wrote: >> > Ok, in the current state, you don't know either what's going to >>> happen. If you write >>> >>> In [1]: x/2*3/4 >>> >>> you have no idea what the r

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 18, 2008, at 11:22 PM, Christian Heimes wrote: > Example syntax (rough idea): > type(1.0) > with float as from decimal import Decimal type(1.0) > When would this "with float ... " considered valid? For example, could I define things before asking for a redefinition? def

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
Hi Christian, On Mon, Aug 18, 2008 at 11:22 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Ondrej Certik wrote: > > Ok, in the current state, you don't know either what's going to >> happen. If you write >> >> In [1]: x/2*3/4 >> >> you have no idea what the result is going to be, you need to a

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Christian Heimes
Ondrej Certik wrote: > Ok, in the current state, you don't know either what's going to > happen. If you write > > In [1]: x/2*3/4 > > you have no idea what the result is going to be, you need to analyze > x.__div__() and start from there. But if you write > > In [2]: 1/2*3/4 > > currently you

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
On Mon, Aug 18, 2008 at 10:45 PM, Andrew Dalke <[EMAIL PROTECTED]> wrote: > On Aug 18, 2008, at 10:01 PM, Ondrej Certik wrote: > >> with Andrew permission, I am starting a new thread, where our >> discussion is ontopic. :) > > Though I want to point out that without specific proposals > of how the

Re: [Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Andrew Dalke
On Aug 18, 2008, at 10:01 PM, Ondrej Certik wrote: > with Andrew permission, I am starting a new thread, where our > discussion is ontopic. :) Though I want to point out that without specific proposals of how the implementation might look, this thread will not go anywhere as it will be too distan

[Numpy-discussion] global overloading of 1+1 -> MyClass(1, 1)

2008-08-18 Thread Ondrej Certik
Hi, with Andrew's permission, I am starting a new thread, where our discussion is ontopic. :) My original question was, that I would like to override 1+1 to return MyClass(1, 1) or something. Robert said it would break other libraries and Andrew said this: On Mon, Aug 18, 2008 at 9:23 PM, Andrew