Stefan Behnel schrieb am 07.11.2014 um 08:18:
> We could fix some of that by allowing
>
> cdef nogil:
> cdef char*(float x, int y) get_gil
>
> But then, that's adding yet another special case.
... except when it's already supported, which it turns out to be...
Stefan
__
1989lzhh schrieb am 07.11.2014 um 05:48:
>> 在 Nov 7, 2014,02:56,Robert Bradshaw 写道:
>> Here's some proposed function pointer syntaxes; which are the most
>> obvious to understand/read/remember? Can you figure them out?
>>
>>cdef float (*F)(float)
>>cdef float (*G)(float (*)(float), float, f
I think you should just use the C declarator syntax. Cython already
allows you to say "cdef int *foo[10]". Declarators aren't bad - just
poorly taught, though I can see some saying those are the same thing.
More below. I absolutely like the declarator one the most, and the
lambda one second most
Thanks for all the feedback!
On Thu, Nov 6, 2014 at 7:13 PM, Travis Scrimshaw wrote:
> Here's my 2 cents.
>>
>>
>> cdef float (*F)(float)
>> cdef float (*G)(float (*)(float), float, float)
>> cdef float ((*H)(char*))(float (*)(float), float, float)
>
>
> I prefer this one because it
On Thu, Nov 6, 2014 at 1:07 PM, Nils Bruin wrote:
> On Thursday, November 6, 2014 10:57:23 AM UTC-8, Robert Bradshaw wrote:
>>
>> cdef float -> float F
>> cdef (float -> float, float, float) -> float G
>> cdef (char*) -> (float -> float, float, float) -> float H
>
> Is there any preced
Robert Bradshaw wrote:
If you want a hint, the last is something that returns numerical
integration algorithm given a string name. Yes, you could use
typedefs, but you shouldn't have to.
I don't find *any* of those particularly easy to read in the third
case, or even the second. Using typedefs
On Thu, Nov 6, 2014 at 11:56 AM, Stefan Behnel wrote:
> Robert Bradshaw schrieb am 06.11.2014 um 19:56:
>> On Thu, Nov 6, 2014 at 9:59 AM, Stefan Behnel wrote:
>>> Robert Bradshaw schrieb am 06.11.2014 um 18:15:
This becomes especially clear for return types, e.g.
cdef ((float -
Robert Bradshaw schrieb am 06.11.2014 um 19:56:
> On Thu, Nov 6, 2014 at 9:59 AM, Stefan Behnel wrote:
>> Robert Bradshaw schrieb am 06.11.2014 um 18:15:
>>> This becomes especially clear for return types, e.g.
>>>
>>> cdef ((float -> float, float, float) -> float)
>>> get_integrator(char* algo
[Cc'ing elsewhere for more feedback. Also top-posting for initial
impressions before the discussion.]
Here's some proposed function pointer syntaxes; which are the most
obvious to understand/read/remember? Can you figure them out?
cdef float (*F)(float)
cdef float (*G)(float (*)(float), f
Robert Bradshaw schrieb am 06.11.2014 um 18:15:
> On Thu, Nov 6, 2014 at 12:29 AM, Stefan Behnel wrote:
>> Robert Bradshaw schrieb am 06.11.2014 um 08:34:
>>> I'd like to propose a more pythonic way to declare function pointer
>>> types, namelye
>>>
>>> type0 (*[ident])(type1, type2, type3)
>>>
On Thu, Nov 6, 2014 at 12:29 AM, Stefan Behnel wrote:
> Robert Bradshaw schrieb am 06.11.2014 um 08:34:
>> I'd like to propose a more pythonic way to declare function pointer
>> types, namelye
>>
>> type0 (*[ident])(type1, type2, type3)
>>
>> would instead become
>>
>> (type1, type2, type3
Zaxebo Yaxebo schrieb am 06.11.2014 um 09:49:
> o good, that solved this issue.
>
> Thanks a lot
If you think there's anything missing from the documentation that would
have helped you find these features yourself, please consider submitting a
pull request that improves the current state.
Stefa
o good, that solved this issue.
Thanks a lot
Zaxebo1
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel
Robert Bradshaw schrieb am 06.11.2014 um 08:34:
> I'd like to propose a more pythonic way to declare function pointer
> types, namelye
>
> type0 (*[ident])(type1, type2, type3)
>
> would instead become
>
> (type1, type2, type3) -> type0 [ident]
Not convinced. Looks quite magic, very dif
14 matches
Mail list logo