Prothon Tutorial
Outline - Page 1
Prothon Home
Preface
Start Tutorial
Next Page
1.
Using the Prothon Interpreter
1.1 Interactive Console
Command-Line Options
Calculator
Indenting
1.2 Executing A Prothon File
Line Endings
Arguments
1.3 Using Console With Files
The -i Option
The -t Option
2.
Introduction to Prothon
2.1 Comments
Hash symbol
C-style
2.2 Indentation
Indent Rule
Mixing Spaces and Tabs
2.3 Line Continuations
Backslash
Open Parentheses
Extra Indents
3.
Data Types, Variables, and Assignment
3.1 Objects, Types & Containers
Data Types
Mixed Types
Assignment
3.2 Numeric Types
Integers
Floats
3.3 Strings
Quotes
Escape Sequences
R and X Strings
Triple Quote Strings
Concatenation
Indexing
Slices
Negative Numbers
Default Indexes
String Functions
3.4 Symbols
Symbol Syntax
Constants & Functions
3.5 Lists
Entering a List
List Indexing
Mutability
Assignment and del
List Functions and !
3.6 Tuples
Entering a Tuple
Functions
3.7 Dictionaries
Keys and Values
Rules about Keys
Entering a Dictionary
Assignment and del
Dictionary Functions and !
4.
Flow Control
4.1 If-Elif-Else
True & False
Question Functions_& ?
obj.bool_?
Sample Code
4.2 For Statement
obj.next()
Iterators
Iterator Types
Sample Code
4.3 While Statement
Sample Code
4.4 Break, Continue, & Else
Break Statement
Continue Statement
Loop Block Tags
Else Clause
Sample Code
5.
Attributes, Variables, & Functions
5.1 Attributes
Attribute Keys
Symbols
Period Operator
Attribute Assignment & Del
5.2 Variables, Scope, & With
Main Module
Variable Scope
With Statement
5.3 Functions & Def Statement
Functions
Def Statement
Function Calls
Positional Params
Default Values
Keyword Params
Variable Parameters
Variable Arguments
Sample Parameter Passing
Local Scope
Pass By Reference
None Object
Return Statement
5.4 Self, Methods & Binding
Self Scope Object
Self Keyword
Default Self
Explicit Self
Methods
Binding
Bound Methods
5.5 Expressions
Operators = Functions
Numeric Functions
Numbers Ending in Period
Trailing Underbar Symbols
Operator List
Sample Expressions
Chained Comparisons
Short-Circuit Expr Eval
And-Or Result Objects
Prothon Home
Outline continued
Start Tutorial
Next Page