File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 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
2
2
3
3
4
4
VIMリファレンスマニュアル by Paul Moore
@@ -334,7 +334,8 @@ Python では、'runtimepath' のパスのリストを使う代わりに、vim.V
334
334
という特別なディレクトリが使われます。このディレクトリが sys.path 内で使われる
335
335
とき、そして vim.path_hooks が sys.path_hooks 内で使われるとき、'runtimepath'
336
336
の各パス {rtp} に対して {rtp} /python2 (or python3) と {rtp} /pythonx (両バー
337
- ジョンで読み込まれる) のモジュールがロードされます。
337
+ ジョンで読み込まれる) のモジュールがロードされます (Note: find_module() は、
338
+ Python 3.12.0a7 辺りで imp モジュールから削除されました)。
338
339
339
340
実装は以下のようになっています。ただし実際は C で書かれています: >
340
341
@@ -394,10 +395,13 @@ vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH*
394
395
395
396
vim.find_module(...) *python-find_module*
396
397
vim.path_hook(path) *python-path_hook*
398
+ vim.find_spec(...) *python-find_spec*
397
399
上述のパスフックの実装に使われるメソッドとオブジェクト。sys.meta_path
398
400
で vim.path_hook を使って何かをするようなことがなければ、これらを直接
399
- 使用することはないでしょう。これらのオブジェクトが Vim の将来のバー
400
- ジョンでも存在するかどうかは保証されません。
401
+ 使用することはないでしょう。vim.find_spec() は Python 3.7 以降で使用可
402
+ 能です。
403
+ これらのオブジェクトが Vim の将来のバージョンでも存在するかどうかは保
404
+ 証されません。
401
405
402
406
vim._get_paths *python-_get_paths*
403
407
パスフックで検索されるパスのリストを返すメソッド。将来のバージョンのこ
Original file line number Diff line number Diff line change @@ -9272,6 +9272,7 @@ python-eval if_pyth.jax /*python-eval*
9272
9272
python-examples if_pyth.jax /*python-examples*
9273
9273
python-fchdir if_pyth.jax /*python-fchdir*
9274
9274
python-find_module if_pyth.jax /*python-find_module*
9275
+ python-find_spec if_pyth.jax /*python-find_spec*
9275
9276
python-foreach_rtp if_pyth.jax /*python-foreach_rtp*
9276
9277
python-input if_pyth.jax /*python-input*
9277
9278
python-options if_pyth.jax /*python-options*
You can’t perform that action at this time.
0 commit comments