玩 Python

收集中文與外文的 Python 相關技術資訊。快來參加本群組,幫忙加 Python 書籤!
小提示: 要快速找到需要的書籤嗎?點左側分類,畫面會先出現該分類下相關的標籤雲。再點標籤之後,即會幫你精準找到「分類」+「標籤」交集過後的書籤。也可以用下方功能列中之收推、討論或熱門等方式加以排序喔
瀏覽模式
書籤標題
收藏時間
321879

gasolin 收藏於 2006/11/14

完整
2006/11/14
319160

gasolin 收藏於 2006/11/09

90% of Python and Ruby code would be identical. Two areas where the two languages do diverge quite drastically is on the topic of metaprogramming and also the idea of explicit over implicit. In Ruby, metaprogramming (programs that write programs) is embraced, while in Python it is seen as something to be avoided for the most part, in favor of code simplicity and readability. This follows the Ruby philosophy of TIMTOWTDI (there is more than one way to do it), versus Python's "there should be one obvious way to do it". Ruby's open-endedness on this is nice in some regards.

雖然現在 Ruby 語言非常熱門, 不過本文作者卻在使用 Rails 開發幾個專案後又轉而使用 Python 的網頁框架, 最終選用 python 語言的原因有執行速度, 語言本身的支援, 方便的函式庫, 還有因為Ruby/Python 不同的編程哲學所造成的程式可讀性(可維護性)差異.

完整
2006/11/09