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

fmt: wording error in fmt.Print docs? #19442

Closed
go101 opened this issue Mar 7, 2017 · 3 comments
Closed

fmt: wording error in fmt.Print docs? #19442

go101 opened this issue Mar 7, 2017 · 3 comments
Milestone

Comments

@go101
Copy link

go101 commented Mar 7, 2017

The docs https://golang.org/pkg/fmt/#Print says:

Spaces are added between operands when neither is a string.

Maybe my English is not good. I interpret as "Spaces are added between operands when both of them are not string." If my interpretation is right, then the docs is wrong. It should be "Spaces are added between operands when at least one of them is not a string."

@griesemer
Copy link
Contributor

I suspect this is correct but leaving for @robpike to decide.

@griesemer griesemer added this to the Go1.9 milestone Mar 7, 2017
@ALTree ALTree changed the title Wording error in fmt.Print docs? fmt: wording error in fmt.Print docs? Mar 7, 2017
@robpike
Copy link
Contributor

robpike commented Mar 21, 2017

Your interpretation is wrong and the docs are correct.

Spaces are added between operands unless either one or both is a string.

The original wording is fine.

@robpike robpike closed this as completed Mar 21, 2017
@go101
Copy link
Author

go101 commented Mar 21, 2017

yes, my impression for print behavior was wrong. I though a space will be added between a string and a non-string.

@golang golang locked and limited conversation to collaborators Mar 21, 2018
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants