語学学習のスペースアルク(SPACE ALC)がお届けする進化するオンライン英和・和英辞書『英辞郎 on the WEB』。大学生やビジネスパースンから翻訳家、医療・製薬業関係者の方々まで幅広くお使いいただいております。
ALC Online Shop

英辞郎データ提供元 EDP のサイトへ
検索文字列 関数呼び出し 該当件数 : 7
* データの転載は禁じられています。  
  • 関数呼び出し
    function call
  • 関数呼び出しのオーバーヘッド
    function-call overhead《コ》
  • 関数呼び出し演算子
    function-call operator《コ》
  • スクリプトの最後を見ると、print(approximate_size(引数))という二つの呼び出しが目に留まるだろう。これらは関数呼び出しだ。まず、いくつかの引数とともにapproximate_size()関数を呼び出して、受け取った戻り値を直接print()関数に渡している。print()関数はPythonの組み込み関数なので、この関数の宣言はどこにも存在しない。このprint()関数はいつでもどこでも使うことができる(組み込みの関数はたくさんあるし、さらにもっと多くの関数がモジュールに分けられて存在している。落ち着きなさい、バッタさん)。
    Look at the bottom of the script, and you'll see two calls to print(approximate_size(arguments)). These are function calls -- first calling the approximate_size() function and passing a number of arguments, then taking the return value and passing it straight on to the print() function. The print() function is built-in; you'll never see an explicit declaration of it. You can just use it, anytime, anywhere. (There are lots of built-in functions, and lots more functions that are separated into modules. Patience, grasshopper.)〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • リストから集合を作るには、set()関数を使えばよい(集合がどのように実装されているのかを知っているスノッブたちは、これが実は関数呼び出しではなく、クラスのインスタンス化であると指摘してくるかもしれない。この違いはこの本の後の章で学ぶことを約束する。現時点では、set()が関数のように機能して、集合を返すことだけを知っていればよい)。
    To create a set from a list, use the set() function. (Pedants who know about how sets are implemented will point out that this is not really calling a function, but instantiating a class. I promise you will learn the difference later in this book. For now, just know that set() acts like a function, and it returns a set.)〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 例外を発生させる構文は実にシンプルだ。raise文を使い、その後に例外名と、オプションでデバッグ用の人間が読める文字列を置く。この構文は関数呼び出しに似ている(実際に、例外はクラスとして実装されており、raiseはValueErrorクラスのインスタンスを生成し、'number must be non-negative'という文字列をインスタンスの初期化メソッドに渡す。しかしこの話は先走り過ぎだ!)。
    The syntax for raising an exception is simple enough. Use the raise statement, followed by the exception name, and an optional human-readable string for debugging purposes. The syntax is reminiscent of calling a function. (In reality, exceptions are implemented as classes, and this raise statement is actually creating an instance of the ValueError class and passing the string 'number must be non-negative' to its initialization method. But we're getting ahead of ourselves!)〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 再帰関数呼び出し
    recursive function call