LoginSignup
5
5

More than 5 years have passed since last update.

Pythonのアンダーバー変数

Last updated at Posted at 2015-08-18

spotify/luigi のs3 targetのコードを眺めていたら、自分が知らない記述方法があったのでメモ。

        _, key = self._path_to_bucket_and_key(path)

_を変数として使うと不要な変数になるらしい。(Python で使わないタプルの値は “_” (アンダーバー) に代入するというプラクティス)

5
5
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5