I'm sorry to bring this up as people would rather code and discuss other 
stuff, but, well, once things are released they tend to stick. So I'll 
just raise the concern and you do what you want to do...

My concern is about the dict struct construction syntax -- from 
"struct_conversion.pyx":

cdef Point p = {color: color, x: x, y: y}

That is, without string keys, but rather some magic keys. This feels 
very odd to a Python eye -- especially as the coercion the other way 
(from struct to dict) seems to have normal string keys.

For more brevity without typing all the " there's always the 
Point(color=...), syntax, and I feel being consistent with keeping it a 
normal dict is important because a later feature might be

cdef Point p
d = {"color": color, "x" : x, "y" : y}
p = d

and then these "literal dict vs. Python dict" kind of thing might be 
even more confusing.

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

Reply via email to