More fun with Python's indentation rules
Python's indentation rules apply only to logicallines (as the documentation is careful to spell out), although theindentation level only comes from the first physical line. This opens upvarious sorts of peculiarity and evil, some of which I mentioned lasttime .
There are two ways for multiple physical lines to be joinedinto one logical lines: being explicitly continued witha \ at the end of the line ( explicit line joining ), orbeing inside a ( , { , or [ ( implicit line joining )
贈興
說現代社會的身份是多元的沒錯,但不同身份卻非散落一地互不相關,它們構成一個權力羅網。你或可像「後現代主義差異論者」所倡言般,從一種身份跳到另一種身份(如果你
Weekly spam summary on December 2nd, 2006
Our SMTP frontend crashed and restarted today at 2:51pm, which meansthat some stats are a little bit distorted. This week, we:
- got 15,320 messages from 276 different IP addresses.
- handled 21,412 sessions from 1,467 different IP addresses.
- received 217,984 connections from at least 66,248 different IPaddresses up until this morning at 4am, and 11,150
這是一個怎樣的週日
牛棚書展.永不磨滅的地攤
拯救書櫃、拯救床鋪、拯救地板、拯救
Ubuntu's attention to detail in init.d scripts
# /etc/init.d/exim4 stopStopping MTA: exim4.# pidof exim43559# grep PIDFILE /etc/init.d/exim4 | sed 1qPIDFILE="/var/run/exim4/exim.pid"# ls -ld /var/run/exim4ls: /var/run/exim4: No such file or directory# mount | fgrep /var/runvarrun on /var/run type tmpfs (rw
歌名:7030d2
歌名:7030d2 (其實佢係未改名的)
作者: 石秀禾
影藝散場
How Python parses indentation
One of the interesting things about Python for compiler geeks is that itis a partially implicit context language, in that line indentation issignificant. Implicit context languages been out of favour for a verylong time, and most parsing techniques these days are geared towardsstream oriented grammars.
(By 'implicit context languages' I mean ones where state changes likeentering and exiting blocks are implicit in the difference betweenlines, such as different indentation levels. By contrast, streamoriented languages use explicit markers for such state changes, like
這時才是天星
自問自答
「我既感情煩惱係我一d感情煩惱都冇。」
o係零晨4點鐘呢一刻,我仲未執好行李,亦未做flight preparation。
阿姆斯特丹既氣溫大約係3至10度,我唔鍾意冬天,我唔想去咁遠既地方,甚至唔想離開屋企。