在使用中文的 Zope/Plone 時,要記得把該 zope instance 裡 etc/zope.conf 之中的 rest-input-encodingrest-output-encoding 設為 UTF-8

rest-input-encoding UTF-8
rest-output-encoding UTF-8

目前已知 Zwiki 0.40 若未進行此設定,rst 中文不正常;不過相同環境下,AT Document 的 rst 中文可以正常使用。測試環境為

  • Zope 2.7.3
  • Plone 2.0.5
  • Archetypes 1.3.2-final
  • ATContentTypes 0.2.0-final
Posted by yungyuc at 23:48, 0 comment, 0 trackback.

呼... 差點以為陪我三年多的 266264T 要出現第一塊完蛋的模組。

不知道是不是撞到什麼東西,CF slot 裡面的針腳歪掉了,讓 CF wlan 卡出問題...

不過,東弄西弄又弄正了。所以,還是要對她溫柔一點得好。

Posted by yungyuc at 18:10, 1 comments, 0 trackback.

Stricter Whitespace Enforcement by Guido van Rossum。

  • All code indented with four spaces. This will also get rid of the tabs problem!
  • No redundant parentheses allowed (e.g. no "return(1)" where "return 1" would do).
  • No whitespace immediately following a left parentheses or immediately before a right parenthesis.
  • No whitespace before a left parenthesis that starts an argument list, or before a left square bracket that starts an index expression (e.g. "x[y]").
  • No whitespace before a comma or semicolon.
  • Exactly one space required after a comma or semicolon (except when at the end of a line).
  • No semicolon at the end of a line (it's redundant).
  • More than one consecutive space within an expression is never allowed.
  • Asignment and comparison operators must be surrounded by spaces.
  • The amount of whitespace on both sides of a binary operator should be the same.
  • If variable amounts of whitespace are used within an expression, this should correspond to the relative priorities of the operators used. For example: "1*2 + 3*4" is okay but "1*2 + 3 * 4" is not. However, "1*2+3*4" is still encouraged.
  • No space allowed before a colon.
  • In a dictionary display, exactly one space required after a colon. In a slice, none.
  • The short form of a block ("if x: y") is abandoned; you must use the newline-plus-indentation form.

PEP8 也真的差不多是這樣。噢,不要啦,我超喜歡用兩個空白來縮排的 ^^;

不過,月曆上 4/1 發佈的消息都得確認再三 :p 過幾天再看看是怎樣。

Posted by yungyuc at 07:43, 0 comment, 0 trackback.
Change to page (10 entries in each page): 1
© hover year to navigate month: powered by django