Friday, March 21, 2008

Py3k letters - Part I, The PEP Talk

This post is all PEP-talk. What pep talk you may ask ? Well not the usual pep-talk but talk about PEPs. "PEP" stands for "Python Enhancement Proposals" and is the way in which Python language developers and enthusiasts go about suggesting, agreeing on and incorporating changes to the Python language.

For Python 3.0, the key PEP is PEP 3000. All Py3k PEPs are numbered starting from 3000 upwards. PEPs 3000-3099 are special, since they are PEPs about PEPs, so called "meta-PEPs". PEP 3000 is like the god of all meta-PEPs, since it is meta-PEP of all meta-PEPs. Think about it something like the father of all meta-PEPs, the originator, the source.

There are two more PEPs which are special. PEP 3099 and PEP 3100. The former is an anti-thesis of a PEP actually, since it refuses to budge - it is a list of things that has no plans of changing in Py3k. Interesting isn't it ?

The latter is the mirror image of the former. It is a laundry list of things that will change in Py3k, which are not big enough to have a PEP of their own. The fact that it follows PEP3099 is not its fault. It just so happens. In fact, this PEP was christened as PEP3000, but as other PEPs were born and began to strive for space and the PEP talk became more and more noisy, the BDFL and his gang of merry men re-christened this PEP all the way up by a century. I am not sure why this happened, but that is history and one cannot change it. However the PEP is not complaining and neither should you. Strange are often the ways of PEP-land...

Now, Py3k was not born as an idea in a single day (neither was Rome built in one), so you can imagine that there was a lot of pep-talk which led to its conception. And though PEP-land is often strange in its ways, it is not as strange as to defy logic completely - it is not. You would expect these PEPs to be older than the one which is bears the name 3000 in its birth certificate, and you would be right if you thought so.

These older PEPs, which are the big brothers of PEP 3000, influenced the growth of PEP 3000. From older to younger, they are,

1. PEP 238, which divided the kingdom of Pythonistas over the something as simple as the division operator. The contention was how to float and divide at the same time, in just one swoop. It turned out that that this was a hard problem to solve and finally after many a battle, the decision was made - float and divide in a single swoop and only divide in two swoops . The ramifications of this decision will be huge for many programs which are inhabitants of the Python land, especially belonging to the numerical and scientific family trees.

2. PEP 328, which made a lot of funny noise with statements that is any combination of the strings "from", "import", ".", "..", and "as" . All to solve the problem of the right syntax of relative imports - that is imports as in importing code, not like importing sugar or oil, which is a more easier problem to solve apparently. This problem is much more abstruse, and aims to bring down packages from folders they live in, relative to the current folder.

3. PEP 343, which is all about disciplining the brat fraternity of "try", "except" and "finally" statements, by giving them some meaning in life (a "context" actually) and holding them together with a "with" statement. Matters get complicated when a context is managed with a contextmanager, as usually happens when managers get involved in any engineering problem.

4. PEP 352, which is about installing an original ancestor for a group of dangerous characters, whose main job is to raise issues which are euphemistically called as "exceptions". Unfortunately, chaos has reigned at the top of this hierarchy with no clearly defined ancestor who these characters can claim lineage to. Pythonistas realized (quite late) that it is dangerous to let the status quo remain and the pep-talk resulted in this PEP which aims to fix the status for good by correcting their ancestor tree. Very well. I am glad we cannot do these things in real life.


So, all the talk about pep-talk has resulted in the above peppy PEPs. Pythonistas live and swear by PEPs, so if you want to learn the Py3k way, you should walk the way of the PEPs for some time and live with them, understanding why and how they exist.

The above PEPs form the soul and core of Py3k, so get used to them and we will discuss the actual issues they solve and how they do it, starting from Part 2 of the Py3k letters. Till then happy PEPing.

45 comments:

njharman said...

This was the most fun read I've had in awhile.

nerinossa said...

All Py3k PEPs are numbered starting from 3000 upwards

yahoo said...

天氣涼了~要注意身體喔@~@..............................

marry said...

Blogs are so informative where we get lots of information on any topic. Nice job keep it up!!
_____________________________

Communication Dissertation

消失 said...

要保持更新呦,加油!!!期待你的新文章!!! ........................................

玉苓 said...

上床圖片av圖片免費色情圖台灣性網陰蒂淫妹貼圖色情激突成人論壇成人色情網激情成人聊天室情色影音鹹濕女生自慰影片淫慾自慰色情a片成人色情圖片網情人視訊網成人話題成人色情台灣成人淫蕩a圖片情色留言板女生奶頭情色成人全裸美女圖片情色寫真裸體照大奶子台灣色情成人網站一夜正妹美女裸體寫真g罩杯美女sex520情趣娃娃視訊打槍視訊辣妹uthome淫亂走光照av情色網女生高潮成人自拍火辣眉眉太太陰毛美女視訊聊天全裸入鏡火辣av三點全露

明宏明宏 said...

hello~~........................................

李惠玲 said...

xvideo打飛機專用網xvideos免費av影片A片洪爺免費85cc免費短片GOGO2聊天室77p2p免費短片洪爺色情片85cc A片go2 a片77p2p免費影片網洪爺貼圖區85cc線上看5278論壇77p2p線上看洪爺成人線上85cc免費看sogo色情77p2p免費看洪爺影城85cc影城go2影片77p2p影城洪爺色論壇85cc免費影片區go2免費影片77p2p免費影片區洪爺貼圖85cc影片區go2av影片77p2p影片區洪爺成年人網85cc成人片sogo成人77p2p成人片洪爺免費色情85cc觀看5278貼圖區77p2p觀看洪爺色情貼85cc影片5278影片網77p2p影片援交妹援交聊天室援交留言成人援交友辣妹野球拳辣妹露點

SydneyJ21074 said...

從來愛都不知它的深度,非得等到別離的時候..................................................

士瑋 said...

幸福是人人都要,又怎麼可能都歸你所有?要知道這世界幸福本來就不多........................................

B120ryantScipio1 said...

辛苦了!祝你愈來愈好!.............................................

辰原 said...

成人情色論壇 aa 片俱樂部視訊i68美女 視訊女郎成人 情色 aa片免費看影片色漫畫帝國 免費a網,免費視訊辣妹 免費av999 sex影片視訊分享區 免費視訊聊天 ex jp成人-免費聊天室 夜色網 avhigh 視訊交友av1688 閃亮天使520聊天室 bt名模論壇 性感辣妹,sex女優 免費影片直播網 免費無碼影片 g8mm 網 34c高雄視訊聊天 正妹影音mmshow 成人a片網 oec 喔伊細辣妹視訊交友 yam交友天堂 777視訊美女 666成人網 哈啦視訊聊天室 性愛姿勢,sogo 色論壇 新竹援交a片免費線上看 a片-癡電車漢 kk俱樂部thmt aa成人漫畫 18禁聊天 18禁成人網 免費影片觀賞 洪爺免費a影片線上直 jp激麻a電影 聊天室交友b shop 成人視訊mela ,g點,免費a片,免費18影片 聊天室環球辣妹聊天室 90691 免費 aa 片試看情色文學 線上 aa 片試看嘟嘟,免費線上a電影 成人交友qk176 辣妹聊天室 90691 AV 前線 avdvd ut聊天室找一夜女 girl5320 貼片et免費影片下載 美國免費 aa 片試看aio 倉井空免費影片 wc123美色女影城 jp成人網

俊達 said...

成功的第一要素是珍惜自己 ............................................................

陳函松 said...

Well done!............................................................

聖妃 said...

想像力的力量比知識更加巨大。 ..................................................

俊偉 said...

要持續更新下去喲!!祝你心情愉快.............................................................

洪筱婷 said...

果然很有意思呀....這當然要頂一頂呀.................................................................

茹順茹順 said...

死亡是悲哀的,但活得不快樂更悲哀。......................................................................

John said...

superb information and very informative blog.
- Magento Development India

佳宣佳宣 said...

卡爾.桑得柏:「除非先有夢,否則一切皆不成。」共勉!............................................................

11吳dennismattie俊易 said...

要用心經營哦~~祝福你~~
..................................................

育隆 said...

quite touching~~~thx for sharing..................................................................

JasonBirk佳琪 said...

在你一無所有的時候 是誰在陪伴你 他便是你最重要的人............................................................

誠李行王wtf桂屏李edt李 said...

感謝不吝分享您的心得............................................................

宋瑞正宋瑞正 said...

It is easier to get than to keep it.............................................................

陳芳 said...

道歉是人類一定必要的禮節..................................................

曾法幸 said...

生存乃是不斷地在內心與靈魂交戰;寫作是坐著審判自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

建佑建佑 said...

老天爺賦予了強者的能力,就是要他比弱者多擔待..................................................

佳瑩佳瑩 said...

一定要保持最佳狀況呦,祝您開心............................................................

林聖瑤 said...

喜歡這裡-支持你的更新............................................................

劉智柏 said...

A bad workman quarrels with his tools.............................................................

Dissertation Writing service said...

This kind of information is very limited on internet. Nice to find the post related to my searching criteria. Your updated and informative post will be appreciated by blog loving people.

Dissertation Methodology

凱v胡倫 said...

做些小善事,說些愛的字句,世界更快樂。..................................................

筱朝宜財 said...

人生中最好的禮物就是屬於自己的一部份............................................................

王辛江淑萍康 said...

友誼能增進快樂,減少痛苦......................................................................

vishal said...

Easy Earning money in online never been this easy and transparent. You would find great tips on how to make that dream amount every Day.Sitting in the home earn around $100 perday. So go ahead and click here for more details and open floodgates to your online income. All the best.
Thanks.

陳倩江陳倩江陳倩江 said...

生命是一頓豐富的宴席,有人卻寧可挨餓................................................

孫邦柔 said...

你的部落格感覺很棒,nice job!............................................................

沛汝 said...

人生中最好的禮物就是屬於自己的一部份............................................................

翊翊翊翊張瑜翊翊翊 said...

很喜歡看看別人的生活故事,謝謝您的分享哦~~...............................................................

張王雅竹欣虹 said...

初次拜訪,祝你人氣一百分

千TatianaCallan惠 said...

精彩的部落格 值得一推再推 支持你......................................................

孫邦柔 said...

上來逛逛,踩個腳印給你~~~..................................................

kate said...

Earning money online never been this easy and transparent. You would find great tips on how to make that dream amount every month. So go ahead and click here for more details and open floodgates to your online income. All the best.

SearchMe4 said...

Technical work is what make the economy move. Since these days technology is what moves things. You can find list of technical work on following directory:Business Directory