(I've mentioned this idea before but it now has more actuality.)
I just read ticket 95. When it comes to subclassing the module type (if
this is possible and easy and doesn't cost too much performance etc etc)
then this has another advantage: We could make early-bound symbols
read-only.
I.e.:
mymod.pyx:
cpdef f(): pass
Python session:
P> import mymod
P> mymod.f = sin
Exception raised:
CythonError("The mymod.f symbol was bound at compile-time and should thus
not be overwritten at runtime")
The main purpose is pedagogical of course, but as we work towards washing
away the differences between "C-level" code and Python-level code, stuff
like this could help getting the point across to users not used to
early-binding...
Same thing applies for "cdef classes" and so on.
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev