]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify admissible argument types for print, println
authorRobert Griesemer <gri@golang.org>
Fri, 28 Apr 2017 00:54:49 +0000 (17:54 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 28 Apr 2017 16:37:31 +0000 (16:37 +0000)
Fixes #19885.

Change-Id: I55420aace1b0f714df2d6460d2d1595f6863dd06
Reviewed-on: https://go-review.googlesource.com/42023
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
doc/go_spec.html

index 769231819c02651626c362d7ae93c77fcb22a3f7..ba5ce894d2ee8e66fb8dbe4160b3fff202e312c1 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of April 17, 2017",
+       "Subtitle": "Version of April 28, 2017",
        "Path": "/ref/spec"
 }-->
 
@@ -5965,6 +5965,11 @@ print      prints all arguments; formatting of arguments is implementation-speci
 println    like print but prints spaces between arguments and a newline at the end
 </pre>
 
+<p>
+Implementation restriction: <code>print</code> and <code>println</code> need not
+accept arbitrary argument types, but printing of boolean, numeric, and string
+<a href="#Types">types</a> must be supported. 
+</p>
 
 <h2 id="Packages">Packages</h2>