Rust 程序设计语言 简体中文版 1.85.0
这行代码完成这个简单程序的所有工作:在屏幕上打印文本。这里有三个重要的细节需要注 意。 首先,println! 调用了一个 Rust 宏(macro)。如果是调用函数,则应输入 println(没有 !)。我们将在第二十章详细讨论宏。现在你只需记住,当看到符号 ! 的时候,就意味着调用 的是宏而不是普通函数,并且宏并不总是遵循与函数相同的规则。 16/562Rust 程序设计语言 简体中文版 如果你更熟悉动态语言,如 Ruby、Python 或 JavaScript,则可能不习惯将编译和运行分为两 个单独的步骤。Rust 是一种 预编译静态类型(ahead-of-time compiled)语言,这意味着你可 以编译程序,并将可执行文件送给其他人,他们甚至不需要安装 Rust 就可以运行。如果你给 他人一个 .rb、.py 或 .js 文件,他们需要先分别安装 Ruby,Python,JavaScript 如果程序的开头没有使用 use std::io; 引入 io 库,我们仍可以通过把函数调用写成 std::io::stdin 来使用该函数。stdin 函数返回一个 std::io::Stdin 的实例,这是一种代表 终端标准输入句柄的类型。 接下来,代码中的 .read_line(&mut guess) 调用了标准输入句柄上的 read_line 方法,以获 取用户输入。我们还将 &mut guess0 码力 | 562 页 | 3.23 MB | 10 天前3Tornado 6.5 Documentation
Tornado [https://www.tornadoweb.org] is a Python web framework and asynchronous networking library, originally developed at FriendFeed [https://en.wikipedia.org/wiki/FriendFeed]. By using non-blocking PyPI [https://pypi.python.org/pypi/tornado], release notes) Source (GitHub) [https://github.com/tornadoweb/tornado] Mailing lists: discussion [https://groups.google.com/forum/#!forum/python-tornado] and announcements announcements [https://groups.google.com/forum/#!forum/python-tornado-announce] Stack Overflow [https://stackoverflow.com/questions/tagged/tornado] Wiki [https://github.com/tornadoweb/tornado/wiki/Links]0 码力 | 437 页 | 405.14 KB | 2 月前3Tornado 6.5 Documentation
. . . . . . . . 165 7 Discussion and support 255 Python Module Index 257 Index 259 iiiTornado Documentation, Release 6.5.1 Tornado is a Python web framework and asynchronous networking library, originally 6.5.1 6 Chapter 2. Hello, worldCHAPTER THREE THREADS AND WSGI Tornado is different from most Python web frameworks. It is not based on WSGI, and it is typically run with only one thread per process copy of the source tarball or clone the git repository as well. Prerequisites: Tornado 6.3 requires Python 3.9 or newer. The following optional packages may be useful: • pycurl is used by the optional tornado0 码力 | 272 页 | 1.12 MB | 2 月前3
共 3 条
- 1