JuliaPy / JuliaPy/PythonCall.jl

PythonCall.jl how do I handle Python exceptions?

未关闭
#388 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
Julia
星标
1.1k
派生
86
平均合并
1 天 22 小时
30 天内合并 PR
3

描述

Using [PythonCall.jl](https://github.com/JuliaPy/PythonCall.jl), how do I best handle python exception patters such as the following python:

```
try:
database = client.create_database(DATABASE_NAME)
except exceptions.CosmosResourceExistsError:
database = client.get_database_client(DATABASE_NAME)
```

[xref stackoverflow](https://stackoverflow.com/questions/77333648/julia-pythoncall-jl-how-do-i-handle-python-exceptions)

贡献指南

这个仓库没有索引到贡献指南

调研方向

The issue points to PythonCall.jl and a linked Stack Overflow question; start by reviewing PythonCall.jl's exception-handling API and the referenced Python example. Document how to catch the specified Python exception and perform the fallback, with a clear usage example as the completion criterion.

由索引模型根据 Issue 内容生成。

评估

技术栈
julia, python
领域
tooling
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。