github.com/goplus/llgo@v0.8.3/py/builtins/builtins.go (about)

     1  /*
     2   * Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  package builtins
    18  
    19  import (
    20  	_ "unsafe"
    21  
    22  	"github.com/goplus/llgo/py"
    23  )
    24  
    25  const (
    26  	LLGoPackage = "py.inspect"
    27  )
    28  
    29  // https://docs.python.org/3/library/functions.html
    30  // https://docs.python.org/3/library/constants.html
    31  
    32  // print(*objects, sep=' ', end='\n', file=None, flush=False)
    33  //
    34  // Print objects to the text stream file, separated by sep and followed by
    35  // end. sep, end, file, and flush, if present, must be given as keyword
    36  // arguments.
    37  //
    38  // All non-keyword arguments are converted to strings like str() does and
    39  // written to the stream, separated by sep and followed by end. Both sep
    40  // and end must be strings; they can also be None, which means to use the
    41  // default values. If no objects are given, print() will just write end.
    42  //
    43  //go:linkname Print py.print
    44  func Print(objects ...*py.Object)
    45  
    46  //go:linkname PrintEx py.print
    47  func PrintEx(__llgo_kwargs *py.Object, objects ...*py.Object)
    48  
    49  // Invoke the built-in help system. (This function is intended for interactive
    50  // use.) If no argument is given, the interactive help system starts on the
    51  // interpreter console. If the argument is a string, then the string is looked
    52  // up as the name of a module, function, class, method, keyword, or documentation
    53  // topic, and a help page is printed on the console. If the argument is any other
    54  // kind of object, a help page on the object is generated.
    55  //
    56  // Note that if a slash(/) appears in the parameter list of a function when invoking
    57  // help(), it means that the parameters prior to the slash are positional-only. For
    58  // more info, see the FAQ entry on positional-only parameters.
    59  //
    60  //go:linkname Help py.help
    61  func Help(object *py.Object)