Code Monkey home page Code Monkey logo

Comments (4)

hainm avatar hainm commented on July 28, 2024

you indeed can use type notation in py2.

https://github.com/python/typing/tree/master/python2

from scikit-chem.

lewisacidic avatar lewisacidic commented on July 28, 2024

Thanks for the input. I think I was meaning syntax supported annotations such as:

def sum(a: int, b: int) -> int:
    return a + b

To my knowledge this is only supported in 3.5, and the typings python 2 module adds the support to the language implementation, but not the syntax. The 3.5 system is definitely the nicest way to do type annotations, if Python 2 didn't exist!

from scikit-chem.

hainm avatar hainm commented on July 28, 2024

I think you need to install typing package by yourself in py2.

https://pypi.python.org/pypi/typing/3.5.2

Hai

On Sep 19, 2016, at 10:32 AM, Rich P. I. Lewis [email protected] wrote:

Thanks for the input. I think I was meaning syntax supported annotations such as:

def sum(a: int, b: int) -> int:
return a + b
To my knowledge this is only supported in 3.5, and the typings python 2 module adds the support to the language implementation, but not the syntax. The 3.5 system is definitely the nicest way to do type annotations, if Python 2 didn't exist!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from scikit-chem.

mwojcikowski avatar mwojcikowski commented on July 28, 2024

I understand it's fully backported, and uses the same name space.

from scikit-chem.

Related Issues (20)

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.