Skip to content

Conversation

@Sungmin-Joo
Copy link
Contributor

Implement the "get" function and add unit test.
fixes#105

py/dict.go Outdated

StringDictType.Dict["get"] =MustNewMethod("get", func(selfObject, argsTuple) (Object, error){
varlength=len(args)
iflength==0{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe "Effective Go" recommands to use switch for these kind of if-else-if code paths:

switch{caselength==0: // ...caselength>2: // ... } ...

Copy link
Member

@sbinetsbinet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nit picks, but LGTM otherwise.

Implement the "get" function and add unit test. fixes#105
@Sungmin-Joo
Copy link
ContributorAuthor

Sungmin-Joo commented Oct 4, 2019

@sbinet
Can I ask you to confirm my PR once again?

Copy link
Collaborator

@corona10corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@corona10corona10 merged commit f3df7a4 into go-python:masterOct 5, 2019
Sign up for freeto 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.

The "get" function is not implemented in the Dict.

3 participants

@Sungmin-Joo@sbinet@corona10