小编puf*_*puf的帖子

Pycharm 2022.1.2 - 具有自动重新加载功能的 Jupyter 笔记本无法正确调试

截至 2022 年 6 月 (2022.1.2) 的最新 PyCharm:

当我在 Jupyter 单元格中打开自动重新加载时:

%load_ext autoreload
%autoreload 2
Run Code Online (Sandbox Code Playgroud)

在单元格中调试 Python 停止工作。调试器不起作用,它只是打印出如下内容:

Traceback (most recent call last):
  File "/home/myUserName/pycharm-2022.1/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_trace_dispatch_regular.py", line 429, in __call__
    abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename]
KeyError: '/home/myUserName/pycharm-2022.1/plugins/python/helpers/pydev/pydevd_file_utils.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/myUserName/pycharm-2022.1/plugins/python/helpers/pydev/pydevd_file_utils.py", line 580, in get_abs_path_real_path_and_base_from_frame
    return NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename]
NameError: name 'NORM_PATHS_AND_BASE_CONTAINER' is not defined

During handling of the above exception, another exception occurred:
Run Code Online (Sandbox Code Playgroud)

如果我关闭 Jupyter 中的自动重新加载,那么调试器将完全按预期工作,但随后我会丢失所有自动重新加载更新代码的功能。

我用谷歌进行了广泛的搜索,但找不到答案。我的 PyCharm 设置几乎是库存的,我认为这一定发生在很多用户身上。我不明白为什么像这样简单和基本的东西在 2022 年 PyCharm …

python jetbrains-ide intellij-idea pycharm jupyter-notebook

6
推荐指数
0
解决办法
393
查看次数

common-lisp — 如何包装具有 var-args 的内置函数?

我想包装内置的:

     (concatenate ‘string <arg1> <arg2> .. <argn>)
Run Code Online (Sandbox Code Playgroud)

成为这样的事情:

     (strcat <arg1> <arg2> ... <argn>)
Run Code Online (Sandbox Code Playgroud)

问题是 - 如何在 common-lisp 中做 var-args?我看到两条可能的路径:

  1. 接受一个列表作为参数,然后splat它/apply它 [我都不知道]
  2. common-lisp 中的 var-args 特殊语法? ex: ...

谢谢

lisp common-lisp variadic-functions

0
推荐指数
1
解决办法
61
查看次数