lldeade python language update

30
Python10とこれから 柴田 @ats ウェブコア株式会社 1286日月曜日

Upload: atsushi-shibata

Post on 17-Jun-2015

9.338 views

Category:

Technology


4 download

DESCRIPTION

This is the slide of 15 minutes talk at the annual lightweight language event in Japan, which mentions to past decade and future of Python language.

TRANSCRIPT

Page 1: LLdeade Python Language Update

Pythonの10年とこれから柴田 淳 @atsウェブコア株式会社

12年8月6日月曜日

Page 2: LLdeade Python Language Update

短い自己紹介

「みんなのPython」の著者です

嫁&息子&わんこLove

12年8月6日月曜日

Page 3: LLdeade Python Language Update

Pythonの,10年で変わったこと変わらなかったことについて話します

12年8月6日月曜日

Page 4: LLdeade Python Language Update

2003年 日本のPython 超マイナー

12年8月6日月曜日

Page 5: LLdeade Python Language Update

2003年にPythonの発表をしたとき

•珍獣扱い

•「インデント,ウザくないですか?」という質問があった

•意味が分からない

•外資ヘッドハントの標的

•秘密兵器的に使っていた

12年8月6日月曜日

Page 6: LLdeade Python Language Update

2003年世界のPython 超メジャー

12年8月6日月曜日

Page 7: LLdeade Python Language Update

期待のルーキー

•標準ライブラリが充実(Battery Included)

•マルチプラットフォーム

•Googleが使い始める(2002年,Python 2.2)

•Python 2.3(2003年7月29日リリース)

12年8月6日月曜日

Page 8: LLdeade Python Language Update

Zope Pythonのキラーアプリ

12年8月6日月曜日

Page 9: LLdeade Python Language Update

Zope

•サーバ内蔵Webアプリケーションフレームワーク

•オブジェクト指向,メタプログラミングを使った開発

•テンプレート言語

• KVM風のオブジェクトデータベース(ZODB)内蔵

•プリミティブなO/Rマッパーを使ってDB操作

12年8月6日月曜日

Page 10: LLdeade Python Language Update

GUIインストーラAnaconda

12年8月6日月曜日

Page 11: LLdeade Python Language Update

Anaconda

• GUIフレームワークPyGTKベース

•ファンシーなUIでLinuxのインストールベース拡大に貢献

• Linuxのデスクトップは最近では普通にPythonを使っている

• yum

• PythonないとLinux動かない

12年8月6日月曜日

Page 12: LLdeade Python Language Update

NumPy(Numeric) 科学計算ライブラリ

12年8月6日月曜日

Page 13: LLdeade Python Language Update

NumPy(Numeric)

• Pythonの科学計算用ライブラリ

•大規模な多次元配列,行列のデータ型を内蔵

•高速な数学ライブラリ

• SciPy(NumPy + MatPlotLib),BioPython,etc.

• iPythonは科学技術系紀元

12年8月6日月曜日

Page 14: LLdeade Python Language Update

Pythonの言語としての10年

あんま変わってない

12年8月6日月曜日

Page 15: LLdeade Python Language Update

Python 3からのバックポート

Python 3からのバックポート

Changes between Python 2.3 to 2.7

Python 2.3(2003)

yield文

Python 2.4(2004)

set型デコレータジェネレータ式複数行import

整数型の統合

Python 2.5(2006)

条件式絶対/相対importtry/except/finally

例外の新スタイルクラス化

Python 2.6(2008)

with文except .. as

8/2進数のリテラルバイトリテラルクラスデコレータ

Python 2.7(2010)

Set型のリテラルディクショナリ/

Set内包表記

12年8月6日月曜日

Page 16: LLdeade Python Language Update

Changes between Python 3.0 to 3.3

Python 3.0(2008)

print()関数view

比較の変更整数型の統合

“/”演算子の変更文字列型の変更

bytes型関数注記

キーワードのみ引数nonlocal文

クラスデコレータexcept .. as

Python 3.1(2009)

with文で複数のcontext managerを受けられるように浮動小数点の評価方法変更

Python 3.3(2012)

u”~”リテラルの復活yield from例外の再構成

Python 3.2(2011)

(モラトリアム期)

12年8月6日月曜日

Page 17: LLdeade Python Language Update

慎重すぎるPython デコレータの例

12年8月6日月曜日

Page 18: LLdeade Python Language Update

デコレータとは

def foo(self): perform method operationfoo = classmethod(foo)

def foo(cls): passfoo = synchronized(lock)(foo)foo = classmethod(foo)

もっと綺麗に書きたい

12年8月6日月曜日

Page 19: LLdeade Python Language Update

決まるまで4ヶ月かかった(c.f. PEP 318)

def func(arg1, arg2, ...): passfunc = dec2(dec1(func))

<classmethod>def foo(arg1,arg2): pass

[classmethod]def foo(arg1,arg2): pass

記号で囲むべきだよ派

decorate: classmethod def foo(arg1,arg2): pass

decorate文が必要だよ派

def @classmethod foo(arg1,arg2): pass

def foo @classmethod (arg1,arg2): pass

def foo(arg1,arg2) @classmethod: pass

|classmethoddef foo(arg1,arg2): pass

@classmethoddef foo(arg1,arg2): pass

前に記号をつけるべきだよ派

|が好きだよ派

@が好きだよ派

12年8月6日月曜日

Page 20: LLdeade Python Language Update

今時のPythonベースサービス

12年8月6日月曜日

Page 21: LLdeade Python Language Update

利用者の広がり PythonはWebだけじゃない

12年8月6日月曜日

Page 22: LLdeade Python Language Update

10年で最も進んだイノベーション

チープ革命

12年8月6日月曜日

Page 23: LLdeade Python Language Update

チープ革命が科学計算の分野にもインパクトを

• SGI,クレイがコモディティ化したPCサーバに

•並列計算が主流に

• FORTRANやMathematicaなどの代替としてPythonが選ばれる

•外部ライブラリとの連携のしやすさ

• NumPy,SciPy,BioPython,MatPlotLib

12年8月6日月曜日

Page 24: LLdeade Python Language Update

Pythonがデファクトとして使われている分野

バイオインフォマティクス 自然言語処理

金融工学気象科学 GIS

CG

12年8月6日月曜日

Page 25: LLdeade Python Language Update

LucasfilmとTwisted

• 2004年から利用

•分散レンダリングに利用

• 2009年にスポンサーに

12年8月6日月曜日

Page 26: LLdeade Python Language Update

気象とPython

• PyAOSPython for Atmospheric and Oceanic Science

•海洋気象物理学のためのライブラリ

•日本の気象庁でも利用

• 省庁で日本の明日を真剣に考えているのは気象庁だけ

• 日本の明日を真剣に考えている

のはPythonだけ

12年8月6日月曜日

Page 27: LLdeade Python Language Update

シンプルなのはいいことだ

12年8月6日月曜日

Page 28: LLdeade Python Language Update

シンプルさがもたらす恩恵

•複数の実装系

• Jython,IronPython,PyPy

• Python Inspiredな言語など

• Boo,CoffeeScript,Go(?)

• Pythonの世界広がりまくりんぐ

12年8月6日月曜日

Page 29: LLdeade Python Language Update

そろそろPython 3

• Python 3.3イケてる(2012年8月末リリース予定)

•主要フレームワーク,ライブラリがPython 3に対応

みんなのPython 第三版が出るのです(2012年8月末くらい)

12年8月6日月曜日

Page 30: LLdeade Python Language Update

ありがとうございました

12年8月6日月曜日