~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to Samples_python/lexical.py

  • Committer: Dave Kuhlman
  • Date: 2015-10-09 19:50:18 UTC
  • mfrom: (35.1.6 Materials)
  • Revision ID: dkuhlman@davekuhlman.org-20151009195018-8rfrdur2zxdjn5ds
Merge after training at Cisco 10/05/2015

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
- True, False, None, ... -- A few unique objects.
53
53
- Built-ins -- See http://docs.python.org/lib/builtin.html and
54
54
  http://docs.python.org/lib/built-in-funcs.html.
 
55
- See PEP 8
55
56
 
56
57
 
57
58
Line structure:
75
76
- Some compound statements have additional clauses, for example:
76
77
  - "try: except: ..."
77
78
  - "if: elif: ... else:"
 
79
  - "for: else:"
78
80
 
79
81
Blocks and indentation:
80
82
 
81
 
- Indent starts a block.
 
83
- Indent starts a nested block.
82
84
- Out-dent ends a block.
83
85
- Empty block -- pass.
84
86
- Always use 4 spaces and no hard tabs for indentation.