I recognized typeof in a recent commit by Robert. Is this a new feature 
in 0.13 or has it been in for some time?

If it is new:

What I'm wondering is whether typeof should perhaps, in the spirit of 
Python, return a descriptive object instead of a string. (It could even 
return a ctypes object describing the type, if that is powerful enough 
for us).

In particular, it should be possible to do introspection about structs 
and so on, so that it is easy to build serializers etc. using "typeof" 
information. (Buffers already put some RTTI about structs to the C file 
BTW, in order to parse buffer format strings.)

This is thinking long-term; but I'm wondering whether the current typeof 
should be renamed e.g. "nameoftype", in order to maintain backwards 
compatability if or when somebody decides to make a more powerful typeof.

Thoughts?

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

Reply via email to