You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
FastBuilt from the ground up to support gradual typing and deliver responsive incremental checks. Performant on large codebases with millions of lines of Python. IntegratedDesigned to help improve code quality and development speed by flagging type errors interactively in your terminal or live in your favorite editor. Fully FeaturedFollows the typing standards introduced in PEPs 484, 526, 612, and
漸進的型付け (Gradual Typing) について語る会 http://camphor.connpass.com/event/28692/ での発表資料です. 資料中の下線部はリンクになっています. リンク先にアクセスするためには PDF ファイルをダウンロードして下さい.
少し前から趣味で実装してるKobinというWebアプリケーションフレームワークのURL Dispatcherの実装をする時に、BottleやDjangoを参考にしながら考えてみました。 これらの比較とType Hintsを利用したKobinのURL Dispatcherの実装についてまとめます。 (追記) リバースルーティング ちょっと長いですが、追記です。結論としては元々紹介していた正規表現ベースのルーティングとは違う方法をKobinで採用しました この記事では正規表現によるルーティングについて解説していたのですが、このルーティング方法は逆引きが少し難しくなります(Djangoは正規表現ベースの逆引きですが、自由度の高い正規表現からURLを生成するために一部妥協しているところもあるようです)。 実際の問題では正規表現が必要となるほど複雑なURL構成になることは稀かもしれません。 逆引きの
概要 PEP 3107 は関数アノテーションの構文を導入しましたが、その意味論は意図的に未定義にされていました。今日では静的型解析を目的としたサードパーティの利用法がたくさんあり、コミュニティは標準化された語彙と標準ライブラリ内の基本的ツールの恩恵を受けられます。 この PEP は、標準化された定義やツールを提供するための暫定モジュールおよびアノテーションを利用できない状況に対する規約を導入します。 この PEP は依然としてアノテーションの他の利用方法を明示的に阻むものではありません。さらに、この仕様に準拠した場合でも、アノテーションに対する何らかの特別な処理を必要とする (または禁止する) ものでもないことに注意してください。それは PEP 333 が Web フレームワークに行ったことのように、単純により良い協調をもたらすものです。 例えば、次の簡単な関数はその引数と戻り値の型がアノ
Python 3.5 introduces type hinting to help code-writing during development. Let’s take a look at this feature and show it in action. Motivation Some folks, but not all, like help from their tools when writing code and documentation. For example, lint-like tools can spot errors before your code executes, and editors and IDEs can harness that to show you mistakes, as you type. Particularly for large
先日、Python の静的型チェッカーとして mypy を紹介しました。 mypy で静的型付け Python プログラミング - forest book 私には難しくてまとめきれないため、Guido が参照している漸進的型付け (Gradual Typing) も含め、また別の機会に、、、。 とか言っているうちに1ヶ月ほど経ってしまいました。 そうこうしているうちに PEP のドラフトも出てきたので区切りとしてまとめておきます。一通り調べたことを基にして書いていますが、私の誤解や勘違いもあるでしょうから怪しいところがあったら調べ直してみてください。もちろんツッコミも大歓迎です。 型ヒント (Type Hints) を導入するという提案 PEP 483 - The Theory of Type Hints | Python.org PEP 484 - Type Hints | Python
本稿は Python に型アノテーションを追加するという PEP 483 - The Theory of Type Hinting の提案で参照されている Jeremy Siek (@jeremysiek) 氏と Walid Taha 氏が開発した漸進的型付けについての入門記事の翻訳です。 What is Gradual Typing Python 3.5 で導入された型アノテーションについて興味がある方は以下を参考にしてください。 Python と型ヒント (Type Hints) と #pyconjp [翻訳] PEP 0484 -- 型ヒント (Type Hints) Revenge of the Types: 型の復讐 私自身、型システムに明るくないため、一部未訳の部分があったり、勘違いや誤訳もあると思います。そういった誤りを見つけたら編集リクエストを送ってもらえると助かります。
Pythonへの型アノテーション導入を目指すGuido van Rossum氏 mypy の型アノテーションの構文を Python に取り込もうとメーリングリストで提案したニュースが話題になりました。今夏に話題になったニュースを今冬にフォローするという季節外れ感ですが、ずっと興味はあって「あとで読む」状態になっていたのを調べてみました。 基本的には mypy のドキュメントから自分の興味のあるところをかいつまんで説明しています。分かりにくいところがあれば原文を参照してください。 Welcome to Mypy documentation! mypy とは mypy は Python の静的型チェッカー (static type checker) です。wikipedia:静的コード解析 や wikipedia:en:Lint (software) ツールの一種だと説明されています。 Pyt
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く