On Feb 1, 2008 7:12 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Currently, in Cython, when x is a python object, <int>x gives the > address of x. This is counter-intuitive and rarely useful. (When it > is, one can always do <size_t><void *>x). > > I would propose making <type>x do a conversion (the same as cdef type > y = x would) whenever type is a non-object type and x isn't, or vica- > versa. Between C types it already behaves this way, and between > Python objects it already has special meaning. > > I would also propose something like > > <ExtensionType?>x to be a cast into type ExtensionType *with* type > checking. > > Thoughts?
+1 to both suggestions. (I'm also testing that I can post to this list.) By the way, I've talked with a lot of people about Cython in the last week, and this is definitely a very important project that's going to get more and more use. And it doesn't hurt for this project that: "TIOBE Software (http://www.tiobe.com/tpci.htm): TIOBE declares Python as programming language of 2007! ["Python has been declared as programming language of 2007. It was a close finish, but in the end Python appeared to have the largest increase in ratings in one year time (2.04%). There is no clear reason why Python made this huge jump in 2007. Last month Python surpassed Perl for the first time in history, which is an indication that Python has become the "de facto" glue language at system level. It is especially beloved by system administrators and build managers. Chances are high that Python's star will rise further in 2008, thanks to the upcoming release of Python 3." --- By the way, why did we switch to [email protected] ? I don't even remember that happening. -- William _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
