JuliaPy / JuliaPy/PyCall.jl

Julia variable assignment in `@pywith`

Open
#957 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Is it (or should it) be possible to assign values to Julia variables within an `@pywith` block? For example,
```julia
julia> @pywith pybuiltin("open")("Manifest.toml", "r") as f begin
manifest = f.readlines()
end

julia> manifest
ERROR: UndefVarError: manifest not defined

```

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.