We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug A clear and concise description of what the bug is.
tuple unpack
Python code example The simplest possible Python code example to demonstrate the bug.
def main(): zz,*x = (0,0,0,0) print(zz,x) if __name__ == '__main__': main()
Current behavior What the program currently outputs for the code example.
package main import "fmt" func main() { zz, x := 0, 0, 0, 0 fmt.Println(zz, x) }
Expected behavior A clear and concise description of what you expected to happen.
x becomes a tuple.
Go code example Optional. An example of a satisfactory Go code output for the Python example.
this may helps
https://stackoverflow.com/questions/19832189/unpack-slices-on-assignment
The text was updated successfully, but these errors were encountered:
The only way to do this in Go would be:
package main import "fmt" func main() { zz := 0 var x []int x = append(x, 0, 0, 0) fmt.Println(zz, x) }
I don't know how easy this would be to implement, but it seems like it would be pretty difficult.
Sorry, something went wrong.
Actually, I just realized, there is a better way that's probably a bit easier:
package main import "fmt" func main() { zz, x := 0, []int{0, 0, 0} fmt.Println(zz, x) }
Don't know how I didn't think of this before
No branches or pull requests
Describe the bug
A clear and concise description of what the bug is.
tuple unpack
Python code example
The simplest possible Python code example to demonstrate the bug.
Current behavior
What the program currently outputs for the code example.
Expected behavior
A clear and concise description of what you expected to happen.
x becomes a tuple.
Go code example
Optional. An example of a satisfactory Go code output for the Python example.
this may helps
https://stackoverflow.com/questions/19832189/unpack-slices-on-assignment
The text was updated successfully, but these errors were encountered: