MySinaBlog 的 RSS 圖片問題又引來 一 些 聲 音 ,因此我快速地將原本用在 Google Reader 的 取全文 Greasemonkey Scripts Port 了一個 Bloglines 版本:
用法差不多,在 Bloglines 的內容版面上,按 “j” 會將文章 highlight,然後再按 “g” 就能取得全文。現時支持: hk yahoo blog, my sina blog,
There's a lot of times where a function wants to return more than aplain boolean; for example, validation routines often want to returnsome sort of explanation of the validation error (if there is one).At the same time, the most natural way to use the function is oftenin the flow of a conditional:
if blah(o): ....elif not validates(o): # whoops, lost the error reason
There's a variety of traditional answers to this,
MySinaBlog 的 RSS 圖片問題又引來 一 些 聲 音 ,因此我快速地將原本用在 Google Reader 的 取全文 Greasemonkey Scripts Port 了一個 Bloglines 版本:
用法差不多,在 Bloglines 的內容版面上,按 “j” 會將文章 highlight,然後再按 “g” 就能取得全文。現時支持: hk yahoo blog, my sina blog,
C's !! double negation idiom is a way of compressing all non-zerovalues of an expression down into a 1. There's a number of things thatyou can use to get the same effect in Python:
cmp() . I'm ambivalent about whether this is obscure usage; you'reat least making it clear what you're doing, although probably not why. (If your result can be