mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-12 15:11:40 +08:00
Development doc fixes
This commit is contained in:
@@ -28,9 +28,9 @@ make an example:
|
||||
>>> import datetime
|
||||
>>> datetime.date.toda# <-- cursor here
|
||||
|
||||
First of it all, this module doesn't care about completion. It really just
|
||||
cares about ``datetime.date``. At the end of the procedure
|
||||
``follow_statement`` will return the ``datetime`` class.
|
||||
First of all, this module doesn't care about completion. It really just cares
|
||||
about ``datetime.date``. At the end of the procedure ``follow_statement`` will
|
||||
return the ``datetime`` class.
|
||||
|
||||
To *visualize* this (simplified):
|
||||
|
||||
@@ -68,7 +68,7 @@ want. This module has been tested by about 600 tests. Don't be afraid to break
|
||||
something. The tests are good enough.
|
||||
|
||||
I need to mention now that this recursive approach is really good because it
|
||||
only *executes* what needs to be *executed*. All the statements and modules
|
||||
only *evaluates* what needs to be *evaluated*. All the statements and modules
|
||||
that are not used are just being ignored. It's a little bit similar to the
|
||||
backtracking algorithm.
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@ This module is split in two parts:
|
||||
|
||||
The ``Parser`` tries to represent the available Python code in an easy to read
|
||||
format. The Python module ``tokenize`` is a very important part in the
|
||||
``Parser``, because it splits the code into different words. Sometimes it looks
|
||||
a bit messy. Sorry for that! You might ask now: "Why didn't you use the ``ast``
|
||||
module for this? Well, ``ast`` does a very good job understanding proper Python
|
||||
code, but fails to work if there's only one single line of broken code.
|
||||
``Parser``, because it splits the code into different words (tokens).
|
||||
Sometimes it looks a bit messy. Sorry for that! You might ask now: "Why didn't
|
||||
you use the ``ast`` module for this? Well, ``ast`` does a very good job
|
||||
understanding proper Python code, but fails to work as soon as there's a single
|
||||
line of broken code.
|
||||
|
||||
The classes are not very hard to understand. They are being named like you
|
||||
would call them: ``Import``, ``Class``, etc.
|
||||
|
||||
Reference in New Issue
Block a user