Python Macros: Use Cases?

后端 未结 17 2126
甜味超标
甜味超标 2021-01-30 18:37

If Python had a macro facility similar to Lisp/Scheme (something like MetaPython), how would you use it?

If you are a Lisp/Scheme programmer, what sorts of things do y

17条回答
  •  长发绾君心
    2021-01-30 18:44

    Some uses cases I have seen before include making class factories or stripping logging statements out of production code.

提交回复
热议问题