Skip to content

runpy.run_path()の__name__についての訳をより分かりやすくする提案 #1019

@ftnext

Description

@ftnext

概要

__name__ は、オプション引数 run_nameNone でない場合、 run_name に設定され、それ以外の場合は '<run_path>' に設定されます。

「それ以外の場合は '<run_path>' に設定されます。」は「Noneでない場合以外の場合(=Noneの場合)」と二重否定になっているため、パッと分かりにくい

問題のある箇所 (URLで指定すること)

https://docs.python.org/ja/3/library/runpy.html#runpy.run_path

問題の詳細

原文 https://docs.python.org/3/library/runpy.html#runpy.run_path

__name__ is set to run_name if this optional argument is not None and to '<run_path>' otherwise.

このページではotherwiseを「そうでなければ」と訳している箇所がある
https://docs.python.org/ja/3/library/runpy.html#runpy.run_module

修正案

「それ以外の場合は '<run_path>' に設定されます。」の修正案

  1. そうでなければ '<run_path>' に設定されます。
  2. Noneの場合は'<run_path>' に設定されます。

1はページ内で訳の一貫性があります。
2は指示語を止めて分かりやすさ優先で直接書きました

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions