Hi,

Dag Sverre Seljebotn wrote:
> For your purposes, outputting "None" is probably 
> wrong anyway. What happens if the client library passes a char* 
> containing the string "None"? How do you distinguish it?

Yes, that's a valid point (and you're right that Johannes pretty much missed
my point). It would be weird if this worked:

    cdef char* s = NULL
    py_s = s
    assert py_s is None

but this didn't:

    cdef char* s
    py_s = None
    s = py_s

So if both would work, you might really end up with situations where you pass
None into a C function as a NULL pointer. Sounds pretty dangerous to me.

Even if we don't allow the second bit, the first case would already blur the
border between NULL pointers and Python objects, which currently is very well
separated. I think it would be a step backwards to cut into that.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to