Results of 1 - 10 of about 50 for optional (0.008 sec.)
- email.utils: 各種ユーティリティ 15385
- email.utils : 各種ユーティリティ ソースコード: Lib/email/utils.py email.utils モジュールには、いくつかの便利なユーティリティがあります: email.utils. localtime ( dt = None ) Return local time as an aware datetime object. If called without ar
...ls. make_msgid ( idstring = None , domain = None ) Returns a string suitable for an RFC 2822 -compliant Message-ID header. Optional idstring , if given, is a string used to strengthen the uniqueness of the message id. Optional domain , if given, provides...time = False , usegmt = False ) Returns a date string as per RFC 2822 , for example: Fri , 09 Nov 2001 01 : 08 : 47 - 0000 Optional timeval , if given, is a floating-point time value as accepted by time.gmtime() and time.localtime() , otherwise the curre...nt time is used. Optional localtime is a flag that when True , interprets timeval , and returns a date relative to the local timezone instead of UTC... - https://man.mtool.work/python/3.14/library/email.utils.html
- smtplib --- SMTP プロトコルクライアント 10287
- smtplib --- SMTP プロトコルクライアント ソースコード: Lib/smtplib.py smtplib モジュールは、SMTP または ESMTP の待ち受けデーモンが動作するインターネット上のマシンへメールを送るための、SMTP クライアントセッションオブジェクトを定義します。 SMT
...stance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations. If the optional host and port parameters are given, the SMTP connect() method is called with those parameters during initialization. If sp...ng socket.getfqdn() . If the connect() call returns anything other than a success code, an SMTPConnectError is raised. The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, th...e global default timeout setting will be used). If the timeout expires, TimeoutError is raised. The optional source_address parameter allows binding to some specific source address in a machine with multiple network interfaces, and... - https://man.mtool.work/python/3.14/library/smtplib.html
- ast --- 抽象構文木 10061
- ast --- 抽象構文木 ソースコード: Lib/ast.py ast モジュールは、Python の抽象構文を表す木を Python アプリケーションで処理するための機能を提供します。 抽象構文自体は Python のリリースごとに変わる可能性がありますが、このモジュールを使えば、現在
...rg , expr value ) attributes ( int lineno , int col_offset , int ? end_lineno , int ? end_col_offset ) -- import name with optional 'as' alias. alias = ( identifier name , identifier ? asname ) attributes ( int lineno , int col_offset , int ? end_lineno..., int ? end_col_offset ) withitem = ( expr context_expr , expr ? optional_vars ) match_case = ( pattern pattern , expr ? guard , stmt * body ) pattern = MatchValue ( expr value ) | MatchSingleton...expr cls , pattern * patterns , identifier * kwd_attrs , pattern * kwd_patterns ) | MatchStar ( identifier ? name ) -- The optional "rest" MatchMapping parameter handles capturing extra mapping keys | MatchAs ( pattern ? pattern , identifier ? name ) | M... - https://man.mtool.work/python/3.14/library/ast.html
- typing --- 型ヒントのサポート 10061
- typing --- 型ヒントのサポート Added in version 3.5. ソースコード: Lib/typing.py 注釈 Python ランタイムは、関数や変数の型アノテーションを強制しません。型アノテーションは、 type checkers や IDE、linterなどのサードパーティーツールで使われます。
...on との互換性を保つには、 get_origin(obj) is typing.Union or get_origin(obj) is types.UnionType を使ってください。 typing. Optional Optional[X] は X | None (や Union[X, None] ) と同等です。 これは、デフォルト値を持つ省略可能な引数とは別の概念です。 デフォ...ルト値があり省略可能というだけで、その引数の型アノテーションに Optional が必要になるわけではありません。 例えば次のようになります。 def foo ( arg : int = 0 ) -> None : ... それとは逆に、 None と...いう値が許されていることが明示されている場合は、引数がオプションであろうとなかろうと、 Optional を使うのが好ましいです。 例えば次のようになります: def foo ( arg : Optional [ int ] = None ) -> None : ... バージョン 3.10... - https://man.mtool.work/python/3.14/library/typing.html
- Argparse チュートリアル 9369
- Argparse チュートリアル author : Tshepang Mbambo このチュートリアルでは、 argparse を丁寧に説明します。 argparse は、Python 標準ライブラリの一部であり、おすすめのコマンドライン引数の解析モジュールです。 注釈 標準ライブラリには、コマンドライ
...えましょう。例では、単にファイル名を表示する代わりにそれぞれのファイルに関する多くの情報を表示します。このケースでは、 -l はoptional引数として知られます。 ヘルプテキストの抜粋です。この実行の仕方は、まだ使用したことがないプログラムにたいして行うと有用で、ヘ...上手くいきました。このプログラムは不正な入力が与えられるとそれを処理せずに、より親切なメッセージを表示して実行を終了します。 Optional引数の導入 ここまで位置引数を扱ってきました。optional引数を追加する方法についても見ていきましょう: import argparse parser =...exit -v, --verbose increase output verbosity 新しい機能がヘルプテキストにも反映されている点に気付いたでしょう。 位置引数とOptional引数の併用 プログラムが複雑になってきました: import argparse parser = argparse . ArgumentParser () parser . add_argument ( "... - https://man.mtool.work/python/3.14/howto/argparse.html
- shelve --- Python オブジェクトの永続化 9369
- shelve --- Python オブジェクトの永続化 ソースコード: Lib/shelve.py "シェルフ (shelf, 棚)" は辞書に似た永続性を持つオブジェクトです。 "dbm" データベースとの違いは、シェルフの値 (キーではありません!) は実質上どんな Python オブジェクトにも ---
...those methods. This is generally accomplished by calling one of bsddb.hashopen() , bsddb.btopen() or bsddb.rnopen() . The optional protocol , writeback , and keyencoding parameters have the same interpretation as for the Shelf class. class shelve. Dbfil...rlying file will be opened using dbm.open() . By default, the file will be created and opened for both read and write. The optional flag parameter has the same interpretation as for the open() function. The optional protocol and writeback parameters have... - https://man.mtool.work/python/3.14/library/shelve.html
- ssl --- ソケットオブジェクト用の TLS/SSL ラッパー 9129
- ssl --- ソケットオブジェクト用の TLS/SSL ラッパー Source code: Lib/ssl.py このモジュールは、クライアント側とサーバー側の両方のネットワークソケットで Transport Layer Security (「Secure Sockets Layer」としてもよく知られています) による暗号化と
...用の証明書を送りません。 このドキュメントの下の方の、 セキュリティで考慮すべき点 に関する議論を参照してください。 ssl. CERT_OPTIONAL SSLContext.verify_mode に指定できる値です。 クライアントモードでは CERT_OPTIONAL は CERT_REQUIRED と同じ意味になります。 ク...サーバ SSL ソケットでは、クライアントはサーバによって認証が要求されている場合にのみ証明書を提供します。したがって、 ( CERT_OPTIONAL や CERT_REQUIRED ではなく) CERT_NONE を使用した場合 getpeercert() は None を返します。 SSLContext.check_hostname も参照して...hake() で相手の証明書のホスト名を照合するかどうかを指定します。 ホスト名を照合するには、コンテキストの verify_mode を CERT_OPTIONAL または CERT_REQUIRED に設定し、 wrap_socket() に server_hostname を渡さなければなりません。 ホスト名の検査を有効にすると、... - https://man.mtool.work/python/3.14/library/ssl.html
- http.client --- HTTP プロトコルクライアント 8903
- http.client --- HTTP プロトコルクライアント ソースコード: Lib/http/client.py このモジュールでは HTTP および HTTPS プロトコルのクライアントサイドを実装しているクラスを定義しています。通常、このモジュールは直接使いません --- urllib.request モ
...HTTPConnection instance represents one transaction with an HTTP server. It should be instantiated by passing it a host and optional port number. If no port number is passed, the port is extracted from the host string if it has the form host:port , else t...he default HTTP port (80) is used. If the optional timeout parameter is given, blocking operations (like connection attempts) will timeout after that many seconds (if it is...not given, the global default timeout setting is used). The optional source_address parameter may be a tuple of a (host, port) to use as the source address the HTTP connection is made from. T... - https://man.mtool.work/python/3.14/library/http.client.html
- pwd --- パスワードデータベース 8211
- pwd --- パスワードデータベース このモジュールは Unix のユーザアカウントとパスワードのデータベースへのアクセスを提供します。全ての Unix 系 OS で利用できます。 利用可能な環境 : Unix, not WASI, not iOS. パスワードデータベースの各エントリはタプ
...の属性欄については、 <pwd.h> を見てください): インデックス 属性 意味 0 pw_name ログイン名 1 pw_passwd 暗号化されたパスワード(optional)) 2 pw_uid ユーザID(UID) 3 pw_gid グループID(GID) 4 pw_gecos 実名またはコメント 5 pw_dir ホームディレクトリ 6 pw_shell シェ... - https://man.mtool.work/python/3.14/library/pwd.html
- decimal --- 10進固定小数点と浮動小数点の演算 7971
- decimal --- 10進固定小数点と浮動小数点の演算 ソースコード: Lib/decimal.py decimal モジュールは、高速で正しく丸められる 10 進浮動小数点演算をサポートします。 float データ型に比べて次のような利点があります: Decimal は「人間を念頭に設計された
...eg = '' ): """Convert Decimal to a money formatted string. places: required number of places after the decimal point curr: optional currency symbol before the sign (may be blank) sep: optional grouping separator (comma, period, space, or blank) dp: decim...al point indicator (comma or period) only specify as blank when places is zero pos: optional sign for positive numbers: '+', space or blank neg: optional sign for negative numbers: '-', '(', space or blank trailneg:... - https://man.mtool.work/python/3.14/library/decimal.html