Skip to content

Commit 7a2bb12

Browse files
committed
Update introductions for feedback
1 parent 96f37c9 commit 7a2bb12

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/language/learn-ql/python/control-flow.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Analyzing control flow in Python
22
================================
33

4-
You can write CodeQL queries to explore the control flow graph of a Python program, for example, to discover unreachable code or mutually exclusive blocks of code.
4+
You can write CodeQL queries to explore the control-flow graph of a Python program, for example, to discover unreachable code or mutually exclusive blocks of code.
5+
6+
About analyzing control flow
7+
--------------------------------------
58

69
To analyze the control-flow graph of a ``Scope`` we can use the two CodeQL classes ``ControlFlowNode`` and ``BasicBlock``. These classes allow you to ask such questions as "can you reach point A from point B?" or "Is it possible to reach point B *without* going through point A?". To report results we use the class ``AstNode``, which represents a syntactic element and corresponds to the source code - allowing the results of the query to be more easily understood. For more information, see `Control-flow graph <http://en.wikipedia.org/wiki/Control_flow_graph>`__ on Wikipedia.
710

docs/language/learn-ql/python/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Functions in Python
22
===================
33

4-
Functions are key building blocks of Python code bases. You can use syntactic classes from the standard CodeQL library to find functions and identify calls to them.
4+
You can use syntactic classes from the standard CodeQL library to find Python functions and identify calls to them.
55

66
These examples use the standard CodeQL class `Function <https://help.semmle.com/qldoc/python/semmle/python/Function.qll/type.Function$Function.html>`__. For more information, see ":doc:`Introducing the Python libraries <introduce-libraries-python>`."
77

docs/language/learn-ql/python/introduce-libraries-python.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
CodeQL library for Python
22
=========================
33

4-
This is an overview of the extensive library you use to analyze databases generated from Python code bases. Using this library makes it easier for you to write queries.
4+
When you need to analyze a Python program, you can make use of the large collection of classes in the Python library for CodeQL.
55

66
About the CodeQL library for Python
77
-----------------------------------
88

9-
The CodeQL library for each programming language uses classes with abstractions and predicates to present data in an object-oriented form.
9+
The CodeQL library for each programming language uses classes with abstractions and predicates to present data in an object-oriented form.
1010

1111
Each CodeQL library is implemented as a set of QL modules, that is, files with the extension ``.qll``. The module ``python.qll`` imports all the core Python library modules, so you can include the complete library by beginning your query with:
1212

docs/language/learn-ql/python/pointsto-type-infer.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
Pointer analysis and type inference in Python
22
=============================================
33

4-
At runtime, each Python expression has a value with an associated type. You can learn how an expression behaves at runtime using type-inference classes from the standard CodeQL library.
5-
6-
7-
This topic contains worked examples of how to write queries using the standard CodeQL library classes for Python type inference.
4+
At runtime, each Python expression has a value with an associated type. You can learn how an expression behaves at runtime by using type-inference classes from the standard CodeQL library.
85

96
The ``Value`` class
107
--------------------

docs/language/learn-ql/python/statements-expressions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Expressions and statements in Python
22
====================================
33

4-
Expressions define a value. Statements represent a command or action. You can explore how they are used in a code base using syntactic classes from the standard CodeQL library.
4+
You can use syntactic classes from the CodeQL library to explore how Python expressions and statements are used in a code base.
55

66
Statements
77
----------

0 commit comments

Comments
 (0)