Skip to content
New issue

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

feat(py): Add more method to tuple object #699

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

aisk
Copy link
Contributor

@aisk aisk commented Aug 11, 2024

Works as expected:

package main

import (
	"github.com/goplus/llgo/py"
	"github.com/goplus/llgo/py/std"
)

func main() {
	t := py.NewTuple(3)
	t.TupleSetItem(0, py.Str("111"))
	t.TupleSetItem(1, py.Str("222"))
	t.TupleSetItem(2, py.Str("333"))
	std.Print(t)
	s := t.TupleSlice(1, 3)
	std.Print(s)
}
$ ./llgo build -o a a.go
# command-line-arguments

$ ./a 
('111', '222', '333')
('222', '333')

Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.58%. Comparing base (dfd85a7) to head (4b26dac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #699   +/-   ##
=======================================
  Coverage   97.58%   97.58%           
=======================================
  Files          19       19           
  Lines        4600     4600           
=======================================
  Hits         4489     4489           
  Misses         94       94           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit 321766f into goplus:main Aug 12, 2024
5 checks passed
@aisk aisk deleted the py-tuple branch August 12, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants