Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Stefan Behnel
Robert Bradshaw, 29.06.2012 11:08: > On Thu, Jun 28, 2012 at 10:45 PM, Stefan Behnel wrote: >> Robert Bradshaw, 28.06.2012 21:46: >>> On Thu, Jun 28, 2012 at 11:38 AM, Stefan Behnel wrote: currently, when I write "new CppClass()" in Cython, it generates a straight call to the "new" operat

Re: [Cython] Cython methods for C/C++ types

2012-07-03 Thread mark florisson
On 3 July 2012 05:58, Stefan Behnel wrote: > Hi, > > the discussion on allowing for automatic user provided ways to coerce > between Python types and C++ types got me thinking that this might hide a > rather interesting general feature: methods for low-level types. I faintly > remember that this i

Re: [Cython] Cython methods for C/C++ types

2012-07-03 Thread mark florisson
On 3 July 2012 05:58, Stefan Behnel wrote: > Hi, > > the discussion on allowing for automatic user provided ways to coerce > between Python types and C++ types got me thinking that this might hide a > rather interesting general feature: methods for low-level types. I faintly > remember that this i

Re: [Cython] Exception: Tests in module 'parallel' were unexpectedly killed by signal 11

2012-07-03 Thread mark florisson
On 3 July 2012 00:04, Yaroslav Halchenko wrote: > please pardon my sloppy cut/paste which ruined the subject line in the > original post ;) So the topic is: > > On Mon, 02 Jul 2012, Yaroslav Halchenko wrote: >> I was thinking about updating Debian package for cython 0.16 but ran into >> the faili

Re: [Cython] Cython methods for C/C++ types

2012-07-03 Thread Stefan Behnel
mark florisson, 03.07.2012 12:15: > On 3 July 2012 05:58, Stefan Behnel wrote: >> the discussion on allowing for automatic user provided ways to coerce >> between Python types and C++ types got me thinking that this might hide a >> rather interesting general feature: methods for low-level types. I

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Dag Sverre Seljebotn
On 07/03/2012 09:14 AM, Stefan Behnel wrote: Robert Bradshaw, 29.06.2012 11:08: On Thu, Jun 28, 2012 at 10:45 PM, Stefan Behnel wrote: Robert Bradshaw, 28.06.2012 21:46: On Thu, Jun 28, 2012 at 11:38 AM, Stefan Behnel wrote: currently, when I write "new CppClass()" in Cython, it generates a s

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Stefan Behnel
Dag Sverre Seljebotn, 03.07.2012 18:11: > On 07/03/2012 09:14 AM, Stefan Behnel wrote: >> I don't know what happens if a C++ exception is not being caught, but I >> guess it would simply crash the application. That's a bit more visible than > > Yep. > >> just printing a warning when a Python exce

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Robert Bradshaw
On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: > Dag Sverre Seljebotn, 03.07.2012 18:11: >> On 07/03/2012 09:14 AM, Stefan Behnel wrote: >>> I don't know what happens if a C++ exception is not being caught, but I >>> guess it would simply crash the application. That's a bit more visible than

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Stefan Behnel
Robert Bradshaw, 03.07.2012 19:58: > On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 03.07.2012 18:11: >>> On 07/03/2012 09:14 AM, Stefan Behnel wrote: I don't know what happens if a C++ exception is not being caught, but I guess it would simply crash the app

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Robert Bradshaw
On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel wrote: > Robert Bradshaw, 03.07.2012 19:58: >> On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 03.07.2012 18:11: On 07/03/2012 09:14 AM, Stefan Behnel wrote: > I don't know what happens if a C++ exception is not

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Dag Sverre Seljebotn
On 07/03/2012 08:23 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel wrote: Robert Bradshaw, 03.07.2012 19:58: On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 03.07.2012 18:11: On 07/03/2012 09:14 AM, Stefan Behnel wrote: I don't know what

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Dag Sverre Seljebotn
On 07/03/2012 08:23 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel wrote: Robert Bradshaw, 03.07.2012 19:58: On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 03.07.2012 18:11: On 07/03/2012 09:14 AM, Stefan Behnel wrote: I don't know what

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Robert Bradshaw
On Tue, Jul 3, 2012 at 11:43 AM, Dag Sverre Seljebotn wrote: > On 07/03/2012 08:23 PM, Robert Bradshaw wrote: >> >> On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel >> wrote: >>> >>> Robert Bradshaw, 03.07.2012 19:58: On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behnel wrote: > > Dag Sve

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Dag Sverre Seljebotn
On 07/03/2012 09:15 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:43 AM, Dag Sverre Seljebotn wrote: On 07/03/2012 08:23 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel wrote: Robert Bradshaw, 03.07.2012 19:58: On Tue, Jul 3, 2012 at 9:38 AM, Stefan Behne

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Dag Sverre Seljebotn
On 07/03/2012 10:39 PM, Dag Sverre Seljebotn wrote: On 07/03/2012 09:15 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:43 AM, Dag Sverre Seljebotn wrote: On 07/03/2012 08:23 PM, Robert Bradshaw wrote: On Tue, Jul 3, 2012 at 11:11 AM, Stefan Behnel wrote: Robert Bradshaw, 03.07.2012 1

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Sturla Molden
Den 03.07.2012 20:43, skrev Dag Sverre Seljebotn: Except for the fact that any code touching "new" could be raising exceptions? That propagates. There is a lot of C++ code out there using exceptions. I'd guess that both mathematical code and Google-written code is unlike most C++ code out t

Re: [Cython] [cython-users] C++: how to handle failures of 'new'?

2012-07-03 Thread Stefan Behnel
Sturla Molden, 04.07.2012 02:58: > Den 03.07.2012 20:43, skrev Dag Sverre Seljebotn: >> Except for the fact that any code touching "new" could be raising >> exceptions? That propagates. >> >> There is a lot of C++ code out there using exceptions. I'd guess that >> both mathematical code and Google-