PFN のオンプレML基盤の取り組み / オンプレML基盤 on Kubernetes 〜PFN、ヤフー〜
PFN のオンプレML基盤の取り組み / オンプレML基盤 on Kubernetes 〜PFN、ヤフー〜
PEP 484 – Type Hints PEP 484 – Type Hints Author: Guido van Rossum <guido at python.org>, Jukka Lehtosalo <jukka.lehtosalo at iki.fi>, Łukasz Langa <lukasz at python.org> BDFL-Delegate: Mark Shannon Discussions-To: Python-Dev list Status: Final Type: Standards Track Topic: Typing Created: 29-Sep-2014 Python-Version: 3.5 Post-History: 16-Jan-2015, 20-Mar-2015, 17-Apr-2015, 20-May-2015, 22-May-2015
Andrew Montalenti @amontalenti – Founder/CTO. Coding in: Python, JavaScript, Zig. Menu and widgets In 2010, the Python core team wrote PEP 3107, which introduced function annotations for Python 3.x. Nearly 4 years ago, I wrote this response to the PEP, but I published it to a discussion site that ended up becoming defunct (Clusterify). I saw that recently, interest in function annotations for type
デフォルト引数周りの型のことでちょっと把握できなかった部分があったのでメモ。 余分なデフォルト引数を持つ実装について 例えば、以下の様なプロトコルがあるとする。 import typing as t import typing_extensions as tx class Adder(tx.Protocol): def add(self, x: int, y: int) -> int: ... このAdder.addメソッドはデフォルト引数を持たない。一方で、デフォルト引数を持つような実装はこのプロトコルの制約を満たすのかということが気になる。 例えば以下のようなもの class A: def add(self, x: int, y: int, *, verbose: bool = False) -> int: return x + y class B: def add(self, x:
Type hints cheat sheet¶ This document is a quick cheat sheet showing how to use type annotations for various common types in Python. Variables¶ Technically many of the type annotations shown below are redundant, since mypy can usually infer the type of a variable from its value. See Type inference and type annotations for more details. # This is how you declare the type of a variable age: int = 1
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く