When calling a Go function that returns multiple values that aren't errors, store it in a tuple
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 136
- Avg merge
- 14m
- Merged PRs (30d)
- 2
Description
Because I was trying to wrap github.com/faiface/beep/vorbis so I can play audio, but the only useful function in that package returns (Streamer, Format, err), and because it returns too many values, Gopy refuses to add it in and I am seemingly stuck.
There should be no problem simply returning a tuple. There are also some methods that return multiple values none of which are errors. If Gopy finds a function that returns an error but doesn't do so using the last return value, it should throw a compile error, but I've never seen one of those.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how gopy handles Go function return values and generates the corresponding Python wrapper, then reproduce the issue with github.com/faiface/beep/vorbis. Done means multiple non-error returns are exposed as a tuple, while a function whose error return is not last produces a compile error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100