[閒聊] Guido van Rossum 的 Google+ 頁面

看板Python作者 ( )時間12年前 (2012/03/20 06:54), 編輯推噓3(303)
留言6則, 4人參與, 最新討論串1/1
https://plus.google.com/u/0/115212051037621986145/posts 搜尋了一下,沒有po過 最新的一則 post 在討論 class 寫的太多的問題 :) Classes must be nouns but not every noun must be a class. If your class only has two methods and one of them is init you probably meant to write a function. 大家有什麼看法呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.39.187.196

03/20 11:21, , 1F
主要是說不要過度OO~不要為了OO而OO~心中有OO就可以了
03/20 11:21, 1F

03/20 12:29, , 2F
因為 Python 的 function 就是 object 了
03/20 12:29, 2F

03/20 12:29, , 3F
且有 module 可以用,所以很多時候不用搞那麼複雜
03/20 12:29, 3F

03/20 12:55, , 4F
not every noun must be a class可是Python的特點之一!
03/20 12:55, 4F


03/20 15:24, , 6F
都只是工具而已..重點是把事情完成 宗教偏執就放一邊吧
03/20 15:24, 6F
文章代碼(AID): #1FPxa9SH (Python)