Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Python モジュールを別のモジュール (両方とも同じディレクトリ内) にインポートしようとしています。 ただし、このスクリーンショットが示すように、クラス定義内ではなく、グローバルにのみ表示されます。
何が間違っている可能性がありますか?
ありがとう!
これは、terrain後で__init__メソッド コードでローカル変数として使用したためです。別の変数名を使用してください。
terrain
__init__