>> Function-by-function or class-by-class. There is no decorator >> support for modules.
lkcl> ... but seriously - doesn't that strike people as... a slightly lkcl> odd omission? Decorators are still a new feature in the language and were purposely added in an incremental fashion. In 2.5 they were added for functions. Suitable use cases were found to apply them to classes in 2.6. You could post your needs to the [EMAIL PROTECTED] list and see if they gain any traction there. If so, perhaps decorators for modules can be added for 2.7. One obvious question about module decorators would be where to apply them. In your original post you suggested perhaps applying it at import time: @compiletojs import mypyjamasmodule What if somewhere else in your application you had a naked import: import mypyjamasmodule Should that be compiled into normal Python bytecode? I suspect in most instances you'd want a module compiled one way or the other. To avoid errors you probably want the decorator inside the module (somewhere - at the top?). Unfortunately, there is no keyword upon which you can hang a decorator as you can with functions (def) and classes (class). import is not the same as a definition. It's not obvious to me that module decorators would use precisely the same sort of syntax as function and class decorators. Skip -- http://mail.python.org/mailman/listinfo/python-list