Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions py/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ type Object struct {
Unused [8]byte
}

// PyObj return self

Choose a reason for hiding this comment

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

medium

According to Go's documentation conventions, doc comments for exported functions should be complete sentences starting with the function's name.1 The current comment is grammatically incorrect. Please update it for better readability and adherence to Go standards.

Suggested change
// PyObj return self
// PyObj returns the object itself.

Style Guide References

Footnotes

  1. Doc comments for exported functions should be complete sentences starting with the function's name. This is a standard convention in Go, as outlined in resources like 'Effective Go'.

func (o *Object) PyObj() *Object {
return o
}
Copy link

Choose a reason for hiding this comment

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

The comment has a grammatical error and is inconsistent with the codebase's documentation style.

Current: // PyObj return self
Should be: // PyObj returns the object itself.

Other methods in this file follow complete sentence structure with proper grammar (e.g., "Compute a string representation of object o...").


// llgo:link (*Object).DecRef C.Py_DecRef
func (o *Object) DecRef() {}

Expand Down
Loading