On Jan 12, 2010, at 9:44 AM, Stefan Behnel wrote: > > Sturla Molden, 12.01.2010 14:04: >> I'd like to make a different suggestion. What about a keyword to pass >> after cdef in the declaration of the object to indicate the vtab can >> be skipped? I e an assertion that the object will be of the declared >> type. This will maintain better compatibility with Python. >> >> cdef Foo bar = Foo() >> cdef inline Foo fastbar = bar >> >> bar.method() # through vtab >> fastbar.method() # direct call > > Why would you want to control this from user code? > > Stefan
It's explicit and selectively breaks Python's semantics as needed for optimization. Much nicer than implicit and global breakage. _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
