くだすれPython(超初心者用) その39at TECH
くだすれPython(超初心者用) その39 - 暇つぶし2ch917:ting-a-syntax-error-for-this-conditional-statement You're getting the SyntaxError because you're using a conditional expression without supplying the else clause which is mandatory. The grammar for conditional expressions (i.e if statements in an expression form) always includes an else clause: と書かれていますが、lambda文以外の普通のif statementsの場合、elseがなくても問題がない場合が多々あると思うのですが、 なぜ>>832の例がやこのリンク先の例だとelse以下がないとだめなのでしょうか?




次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch