Python Macros: Use Cases?

后端 未结 17 2104
甜味超标
甜味超标 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:50

    Read "The Lambda Papers" so you might find out generally why one would take advtage of macros at all.

    You should start with ‘AIM-353 Lambda:The Ultimate Imperative’ and follow it with ‘AIM-443 Lambda: The Ultimate GOTO’. Both may be found here:

    http://library.readscheme.org/page1.html

提交回复
热议问题