Code Monkey home page Code Monkey logo

Comments (5)

nikhilk avatar nikhilk commented on August 28, 2024

This is something that is orthogonal to our new UX ... the completion support is coming from the IPython kernel itself, which we'll continue to use. We should definitely look into how to improve it ... but do so in a way that it can be upstreamed back to the ipython/jupyter project.

I agree ... it would be much nicer if it can be based on a more sophisticated type inference approach.

However a bit of a technical question - how would you infer? There is nothing in the signature of a python method that indicates what it returns, and the python doc-comments (as verbose as they are) aren't exactly guaranteed to be machine readable (unlike jsdoc comments).

from datalab.

gramster avatar gramster commented on August 28, 2024

Jedi does code analysis to do type inference.

If we were to do it ourselves at low cost, we would need annotations. There are many ways to do these, but the best is probably the standard function_annotations (for 3.x) or annotations (2.x); see http://python-future.org/func_annotations.html.

Note that Python 3.5 is expected to have optional typing and 3.x function annotations will be deprecated or removed at that point in favor of these; probably not a big deal though.

from datalab.

gramster avatar gramster commented on August 28, 2024

It looks like IPython semi-handles this by having a greedy option to autocomplete; however, its a hack - it executes the code before . in order to get something it can introspect on. No good for our purposes.

from datalab.

nikhilk avatar nikhilk commented on August 28, 2024

Oh, I didn't realize IPython tries to evaluate the code... seems dangerous, and error prone. Tempted to say we should try to turn it off. Wouldn't want to inadvertently do something that is costly, long running or worse has unexpected side-effects.

from datalab.

VelizarVESSELINOV avatar VelizarVESSELINOV commented on August 28, 2024

Atom has a great Python plugins (linter-flake8, linter-pep8, linter-pydocstyle, linter-pylama, linter-pylint, linter-python-pep257, linter-python-pep8, linter-python-pyflakes, python-isort, etc.) that we are missing in Datalab, Jupyter team is working on Jupyter-notebook. If you can make the Datalab experience closer to Atom it will be great.

from datalab.

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.