[問題] Expression vs. statement
什麼是 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
討論串 (同標題文章)
Python 近期熱門文章
PTT數位生活區 即時熱門文章