Using eval inside macro?

eval in macro can easily evaluate in the wrong scope. It is totally OK if the intended sematic is to evaluate the part of the expression only in top-level (global) scope, which includes macros that should only be used in global scope, like @enum. You should also make sure the eval is done in the right module (current_module() pre-0.7 and __module__ post-0.7).

5 Likes