[問題] Expression vs. statement

看板Python作者 (huggie)時間18年前 (2007/01/05 08:23), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
什麼是 expression, 什麼是 statement? 應該有分這兩種, 寫了很久的python了 還是沒弄懂 http://norvig.com/python-iaq.html Java and C++ have the ternary conditional operator (test ? result : alternative). Python has resisted this, but in the upcoming Python 2.5 it will allow expressions of the form (result if test else alternative). This undermines Python's clear distinction between expressions and statements, but it is a compromise that many people have asked for. "distinction between expression and statements" 不懂他什麼意思 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.160.67
文章代碼(AID): #15dWi8Ep (Python)
討論串 (同標題文章)
以下文章回應了本文
完整討論串 (本文為第 1 之 3 篇):
18年前, 2007/01/05 08:23
1
1
文章代碼(AID): #15dWi8Ep (Python)