On Aug 22, 2008, at 8:46 AM, Hoyt Koepke wrote: > Hello, > > I'm a relative newbie to cython/pyrex, so I won't be offended if this > suggestion gets thrown out quickly as long as I learn something in the > process. From my googling, it seems that decorators aren't really > supported by cython/pyrex yet > (http://wiki.cython.org/enhancements/decorators) but are on cython's > to-do list.
In the latest version, they're on Cython's done list (function decorators that is, and class decorators should be easy given that). > It strikes me that decorators would be a natural way of > handling this, i.e. having a @notNone decorator for functions that has > the affect of adding "not None" to every argument. If part of the > reason for switching the default is that writing "not None" for every > argument is awkward, this would be a reasonable middle ground. Yes, that's a great idea. When I say I want to add it as a compiler option, I'm thinking like http://wiki.cython.org/docs/ compilerdirectives . - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
