Tornado 6.5 Documentation
is often used to start the main function of a batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine groups are the path arguments and will be passed to the handler’s HTTP method. If a dictionary is passed as the third ele- ment of the URLSpec, it supplies the initialization arguments which will be passed User’s guide 23Tornado Documentation, Release 6.5.1 The Application constructor takes many keyword arguments that can be used to customize the behavior of the ap- plication and enable optional features; see0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
is often used to start the main function of a batch-oriented program: # run_sync() doesn't take arguments, so we must wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine groups are the path arguments and will be passed to the handler’s HTTP method. If a dictionary is passed as the third element of the URLSpec, it supplies the initialization arguments which will be passed StoryHandler, dict(db=db), name="story") ]) The Application constructor takes many keyword arguments that can be used to customize the behavior of the application and enable optional features; see0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
^^^^^^^^^^^^^^ expected `&String`, found `&{integer}` | | | arguments to this method are incorrect | = note: expected reference `&String` found reference 我们可以定义为拥有 参数(parameters)的函数,参数是特殊变量,是函数签名的一部分。 当函数拥有参数(形参)时,可以为这些参数提供具体的值(实参)。技术上讲,这些具体值 被称为参数(arguments),但是在日常交流中,人们倾向于不区分使用 parameter 和 argument 来表示函数定义中的变量或调用函数时传入的具体值。 在这版 another_function 中,我们增加了一个参数: fn new(args: &[String]) -> Config { if args.len() < 3 { panic!("not enough arguments"); } // --snip-- 示例 12-8:增加一个参数数量检查 这类似于示例 9-13 中的 Guess::new 函数,那里如果 value 参数超出了有效值的范围就调用0 码力 | 562 页 | 3.23 MB | 8 天前3
共 3 条
- 1