Skip to content

Commit 8a49a16

Browse files
1 parent a7416a0 commit 8a49a16

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

doc/if_pyth.jax

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_pyth.txt* For Vim バージョン 9.1. Last change: 2023 Oct 25
1+
*if_pyth.txt* For Vim バージョン 9.1. Last change: 2024 May 16
22

33

44
VIMリファレンスマニュアル by Paul Moore
@@ -334,7 +334,8 @@ Python では、'runtimepath' のパスのリストを使う代わりに、vim.V
334334
という特別なディレクトリが使われます。このディレクトリが sys.path 内で使われる
335335
とき、そして vim.path_hooks が sys.path_hooks 内で使われるとき、'runtimepath'
336336
の各パス {rtp} に対して {rtp}/python2 (or python3) と {rtp}/pythonx (両バー
337-
ジョンで読み込まれる) のモジュールがロードされます。
337+
ジョンで読み込まれる) のモジュールがロードされます (Note: find_module() は、
338+
Python 3.12.0a7 辺りで imp モジュールから削除されました)。
338339

339340
実装は以下のようになっています。ただし実際は C で書かれています: >
340341
@@ -394,10 +395,13 @@ vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH*
394395

395396
vim.find_module(...) *python-find_module*
396397
vim.path_hook(path) *python-path_hook*
398+
vim.find_spec(...) *python-find_spec*
397399
上述のパスフックの実装に使われるメソッドとオブジェクト。sys.meta_path
398400
で vim.path_hook を使って何かをするようなことがなければ、これらを直接
399-
使用することはないでしょう。これらのオブジェクトが Vim の将来のバー
400-
ジョンでも存在するかどうかは保証されません。
401+
使用することはないでしょう。vim.find_spec() は Python 3.7 以降で使用可
402+
能です。
403+
これらのオブジェクトが Vim の将来のバージョンでも存在するかどうかは保
404+
証されません。
401405

402406
vim._get_paths *python-_get_paths*
403407
パスフックで検索されるパスのリストを返すメソッド。将来のバージョンのこ

doc/tags-ja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9272,6 +9272,7 @@ python-eval if_pyth.jax /*python-eval*
92729272
python-examples if_pyth.jax /*python-examples*
92739273
python-fchdir if_pyth.jax /*python-fchdir*
92749274
python-find_module if_pyth.jax /*python-find_module*
9275+
python-find_spec if_pyth.jax /*python-find_spec*
92759276
python-foreach_rtp if_pyth.jax /*python-foreach_rtp*
92769277
python-input if_pyth.jax /*python-input*
92779278
python-options if_pyth.jax /*python-options*

0 commit comments

Comments
 (0)