Re: [Cython] Fused Types

2011-05-02 Thread Stefan Behnel
Robert Bradshaw, 30.04.2011 08:16: On Fri, Apr 29, 2011 at 8:04 AM, mark florisson With the type matching it matches on exactly 'if src_type is dst_type:' so you can't use 'and' and such... perhaps I should turn these expression into a node with the constant value first and then see if the resul

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/01/2011 06:25 PM, Sturla Molden wrote: Den 01.05.2011 16:36, skrev Stefan Behnel: Not everyone uses C++. And the C++ compiler cannot adapt the code to specific Python object types. Ok, that makes sence. Second question: Why not stay with the current square-bracket syntax? Does Cython n

Re: [Cython] Fused Types

2011-05-02 Thread mark florisson
On 2 May 2011 11:08, Stefan Behnel wrote: > Robert Bradshaw, 30.04.2011 08:16: >> >> On Fri, Apr 29, 2011 at 8:04 AM, mark florisson >>> >>> With the type matching it matches on exactly 'if src_type is >>> dst_type:' so you can't use 'and' and such... perhaps I should turn >>> these expression int

Re: [Cython] Fused Types

2011-05-02 Thread Stefan Behnel
mark florisson, 02.05.2011 11:22: On 2 May 2011 11:08, Stefan Behnel wrote: Robert Bradshaw, 30.04.2011 08:16: On Fri, Apr 29, 2011 at 8:04 AM, mark florisson With the type matching it matches on exactly 'if src_type is dst_type:' so you can't use 'and' and such... perhaps I should turn thes

Re: [Cython] Fused Types

2011-05-02 Thread mark florisson
On 2 May 2011 12:32, Stefan Behnel wrote: > mark florisson, 02.05.2011 11:22: >> >> On 2 May 2011 11:08, Stefan Behnel wrote: >>> >>> Robert Bradshaw, 30.04.2011 08:16: On Fri, Apr 29, 2011 at 8:04 AM, mark florisson > > With the type matching it matches on exactly 'if src_type i

Re: [Cython] Fused Types

2011-05-02 Thread Sturla Molden
Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn: I.e., your question is very vague. Ok, what I wanted to ask was "why have one syntax for interfacing C++ templates and another for generics?" It seems like syntax bloat to me. You're welcome to draft your own proposal for full-blown templat

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/02/2011 03:00 PM, Sturla Molden wrote: Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn: I.e., your question is very vague. Ok, what I wanted to ask was "why have one syntax for interfacing C++ templates and another for generics?" It seems like syntax bloat to me. But we do that. The

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/02/2011 03:00 PM, Sturla Molden wrote: Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn: I.e., your question is very vague. Ok, what I wanted to ask was "why have one syntax for interfacing C++ templates and another for generics?" It seems like syntax bloat to me. You're welcome to d

Re: [Cython] Fused Types

2011-05-02 Thread Robert Bradshaw
On Sun, May 1, 2011 at 2:38 AM, mark florisson wrote: > On 30 April 2011 09:51, Dag Sverre Seljebotn > wrote: >> On 04/30/2011 08:39 AM, Robert Bradshaw wrote: >>> >>> On Fri, Apr 29, 2011 at 3:53 AM, mark florisson >>>  wrote: On 29 April 2011 12:28, Pauli Virtanen  wrote: >

Re: [Cython] Fused Types

2011-05-02 Thread mark florisson
On 2 May 2011 18:24, Robert Bradshaw wrote: > On Sun, May 1, 2011 at 2:38 AM, mark florisson > wrote: >> On 30 April 2011 09:51, Dag Sverre Seljebotn >> wrote: >>> On 04/30/2011 08:39 AM, Robert Bradshaw wrote: On Fri, Apr 29, 2011 at 3:53 AM, mark florisson  wrote: > >

Re: [Cython] Fused Types

2011-05-02 Thread Robert Bradshaw
On Mon, May 2, 2011 at 1:56 PM, mark florisson wrote: > On 2 May 2011 18:24, Robert Bradshaw wrote: >> On Sun, May 1, 2011 at 2:38 AM, mark florisson >> wrote: >>> A remaining issue which I'm not quite certain about is the >>> specialization through subscripts, e.g. func[double]. How should this

[Cython] Fwd: automatic character conversion problem

2011-05-02 Thread Robert Bradshaw
Dear Cython developers, Recently I encountered a problem with Cython's automatic char* to string conversion (Cython version 0.14.1). I'll attach two sample source files. The first one, char2str_a.pyx prints "The quick...", just as I expected. But the second example prints "... lazy dog.". In the o

Re: [Cython] automatic character conversion problem

2011-05-02 Thread Robert Bradshaw
On Fri, Apr 29, 2011 at 6:57 AM, Hans Terlouw wrote: > Dear Cython developers, > > Recently I encountered a problem with Cython's automatic char* to string > conversion (Cython version 0.14.1). I'll attach two sample source files. The > first one, char2str_a.pyx prints "The quick...", just as I ex

Re: [Cython] automatic character conversion problem

2011-05-02 Thread Stefan Behnel
[moving this to cython-users] Robert Bradshaw, 03.05.2011 06:38: On Fri, Apr 29, 2011 at 6:57 AM, Hans Terlouw wrote: Recently I encountered a problem with Cython's automatic char* to string conversion (Cython version 0.14.1). I'll attach two sample source files. The first one, char2str_a.pyx p