GithubHelp home page GithubHelp logo

typing's Introduction

typing: Type Hints for Python

Build Status

What Is typing?

This is a backport of the typing module introduced in Python 3.5 beta 1 to Python 3.2, 3.3 and 3.4. The eventual goal is to also provide a stripped-down implementation for Python 2.7. typing allows you to add type annotations to your code in a standard format that will be understood by static type checkers and IDEs.

Here is a small example:

from typing import Iterator

def fib(n: int) -> Iterator[int]:
    a, b = 0, 1
    while a < n:
        yield a
        a, b = b, a + b

Documentation about typing in general is hosted everywhere (see the links below).

Status

This is work in progress. The typing module may still undergo small changes before Python 3.5 is finalized.

The Python 2 version is woefully out of date.

Useful Links

License

Since typing is lifted from Python 3.5, it's distributed under the PSF license. The current Python 2 version (which does not conform to PEP 484 yet) is distributed under the MIT license, but it will be replaced by a version that is derived from the Python 3.5 version soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.