Skip to content

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

Merged
xushiwei merged 1 commit into
xgo-dev:mainfrom
aisk:py-tuple
Aug 12, 2024
Merged

feat(py): Add more method to tuple object#699
xushiwei merged 1 commit into
xgo-dev:mainfrom
aisk:py-tuple

Conversation

@aisk

@aisk aisk commented Aug 11, 2024

Copy link
Copy Markdown
Contributor

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')

@codecov

codecov Bot commented Aug 11, 2024

Copy link
Copy Markdown

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 xgo-dev:main Aug 12, 2024
@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