Re: [Cython] Hello

2020-01-28 Thread John Skaller2
> > For your system, you may need a way of annotating function > declarations with refcounting rules where they differ from > the defaults. Yeah, and i have to encode that to some extent in the type system. However I have two techs to play with: Felix and C++. Both can, for example, do subtyping

Re: [Cython] Hello

2020-01-28 Thread Greg Ewing
On 29/01/20 8:37 am, John Skaller2 wrote: If I implement that with just static casts for coercions, then say, given a dictionary and a function accepting a mapping argument, you can pass a dictionary or mapping, but not an object. If you want to pass an object you have to explicitly coerce it.

Re: [Cython] Hello

2020-01-28 Thread Greg Ewing
On 29/01/20 1:33 am, John Skaller2 wrote: # This conflicts with the C++ bool type, and unfortunately # C++ is too liberal about PyObject* <-> bool conversions, # resulting in unintuitive runtime behavior and segfaults. #("bool","PyBool_Type", []), Now you have me worried! Any more

Re: [Cython] Hello

2020-01-28 Thread John Skaller2
So I just had a thought, I might try something to enhance the bindings. Not sure if it will work. My system supports subtyping. For bindings and other nominal types you can simple define a subtyping coercion. Now in Python we have subtyping rules like: dictionary -> mapping -> object If I impl

Re: [Cython] Hello

2020-01-28 Thread John Skaller2
> On 28 Jan 2020, at 21:07, Stefan Behnel wrote: > > John Skaller2 schrieb am 28.01.20 um 10:57: >> What’s a “descr” when its at home? > > A descriptor, a special protocol in Python. > > https://docs.python.org/3/howto/descriptor.html Got it, thanks! > >> There are some special words in px

Re: [Cython] Hello

2020-01-28 Thread Stefan Behnel
John Skaller2 schrieb am 28.01.20 um 10:57: > What’s a “descr” when its at home? A descriptor, a special protocol in Python. https://docs.python.org/3/howto/descriptor.html > There are some special words in pxd files like “list” which mean > PyObject that happens to be a list. Is there a list o

Re: [Cython] Hello

2020-01-28 Thread John Skaller2
What’s a “descr” when its at home? There are some special words in pxd files like “list” which mean PyObject that happens to be a list. Is there a list of these somewhere? — John Skaller skal...@internode.on.net ___ cython-devel mailing list cython