如何禁用Clojure断言,包括前提条件? [英] How to disable Clojure assertions, including preconditions?

查看:65
本文介绍了如何禁用Clojure断言,包括前提条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在REPL中禁用Clojure断言(包括前提条件和后置条件)的一些好方法是什么?要获得任意的Leiningen个人资料?

What are some good ways to disable Clojure assertions (including preconditions and postconditions) in the REPL? For an arbitrary Leiningen profile?

推荐答案

profiles.clj中将:global-vars设置为{*assert* false}.

您可以将上述设置放入所需的任何Leiningen个人资料中.

You can put the above setting in whatever Leiningen profiles you want.

这篇关于如何禁用Clojure断言,包括前提条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆