並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 4 件 / 4件

新着順 人気順

pyreの検索結果1 - 4 件 / 4件

  • Professional-grade mypy configuration

    Type hints are an essential part of modern Python. Type hints are the enabler for clever IDEs, they document the code, and even reduce unit testing needs. Most importantly, type hints make the code more robust and maintainable which are the attributes that every serious project should aim for. At Wolt we have witnessed the benefits of type hints, for example, in a web backend project which has 100

      Professional-grade mypy configuration
    • Pythonの列挙型と型チェッカについて - 何かを書き留める何か

      言いたいこと Pythonの列挙型を定義する方法としてクラスと関数呼び出しの2種類存在する。 関数呼び出しで列挙型を定義するべき状況とは、列挙型を動的に制御したい状況である。 しかし、関数呼び出しで列挙型を定義すると、mypyを通して型チェックをする際に都合が悪い。 列挙型を動的に制御したい場合は列挙型を使わずに素直に辞書を使う。 列挙型とは Pythonの公式ドキュメントには、列挙型について次のように説明している。 一意の値に紐付けられたシンボリックな名前の集合です 要は、まとめて扱いたい定数の集まりである。 列挙型の定義方法 Pythonには列挙型の定義方法として、クラスによる定義、関数呼び出しによる定義の2種類存在する。 公式ドキュメントの例に基づいて、それぞれの例を示す。 クラスによる定義 import enum class Planet(enum.Enum): MERCURY =

        Pythonの列挙型と型チェッカについて - 何かを書き留める何か
      • Riots resurface memories of racist violence for British Asians - with glimmer of hope

        'I thought days of race hatred were over' - Riots take British Asians back to 1970s Mosques attacked with bricks and stones. Marchers chanting “we want our country back.” And a man’s head reportedly stamped on during a racist attack. These scenes from the past week in England and Northern Ireland have sparked painful memories among British Asians who remember the 1970s and 80s, when racist violenc

          Riots resurface memories of racist violence for British Asians - with glimmer of hope
        • Static Typing with Python — typing documentation

          See also The documentation at https://mypy.readthedocs.io/ is relatively accessible and complete. Particularly refer to the “Type System Reference” section of the docs – since the Python typing system is standardised via PEPs, this information should apply to most Python type checkers. Indices and tables¶ Index Search Page Discussions and Support¶ User help forum User chat on Gitter Developer mail

          1