Why I am not really fond of docstrings in Python

I wrote some nice things before about how Idon't really use docstrings, but in thinking about it more I've realizedthat I was shading the truth. The real truth is that I don't really likeusing docstrings, and I've recently figured out why: docstrings don'tstand out enough.

(I have to say here that I have nothing against documenting my code;I just want it to look right.)

Unless you use an editor and display environment that set docstringsoff


More thinking about Python's inheritance model

Here's something I've been pondering lately: why doesn't Python havean inheritance model more like C++, where (forexample) your superclass's __init__ is automatically called?

There's a number of reasons, but I think that one of them is that Pythonlacks any concept of private class attributes and methods. When youlimit what a subclass can do to a superclass, when you have privateinternal state that has to be maintained correctly, it's


Click: 女人的理想

丫!怎麼被你搶先寫了

難得

大家從工作堆裡爬出來,帶著一堆鬼五馬六的東西大鬧婚宴,迫男生綁上粉紅蝴蝶結,像黑社會吵著「接吻!接吻!」,旁邊文人雅士為之側目。把自己變成奇觀,擊倒沉悶婚禮!一靜下來,大家就埋首校對。大概很少婚宴桌上

賣書之五

確實是閉關中,但間屋又實在快要爆炸了,週六婚宴又要給人情………來吧,又是慈善時間。(另,請答應了買書的人快點來拿!stella !!)另外提醒各位顧客,若見有人先於自己認投,請別放棄,先給我留個口訊,因為之前說買

關於屈原被屈機

關於屈原被屈機

整個上午,我一直想嘔。首先因為遊艇拋來拋去,其次因為這段日子嚴重睡眠不足。在遊艇上當然還有我的一班好同事:Eric和Cindy正在狂吃到會的甜點,Katie和Emma躲在太陽傘下生怕曬黑皮膚,Sam剛剛吃完止嘔丸,現在

貓仔跳艷舞

夏日炎炎, 正好....

Continue reading...

The implicit versus the explicit

In a lot of computer things (such as programming languages, or systemenvironments) we have the choice between being concise and leavingthings implicit, and being verbose but making things explicit. Hereis the thing about this choice:

Computers are fine with implicit things because they never forget ;they effectively have perfect memories for this sort of thing. Buthumans have limited memories (especially short term memories) that haveto be periodically reinforced, so we necessarily forget some of theimplicit stuff every so often. Which periodically causes


CLICK: ONTV short interview


袁 彌 明 出 書 嘲 《 肥 田 喜 事 》 白 癡



Continue reading...