課程名稱:PCAP: Certified Associate in Python Programming 認證課程 - 簡稱:PCAP Training Course |
Modules and Packages
- import variants; advanced qualifying for nested modules
- dir(); sys.path variable
- math: ceil(), floor(), trunc(), factorial(), hypot(), sqrt(); random: random(), seed(), choice(), sample()
- platform: platform(), machine(), processor(), system(), version(), python_implementation(), python_version_tuple()
- idea, __pycache__, __name__, public variables, __init__.py
- searching for modules/packages; nested packages vs directory tree
Exceptions
- except, except:-except; except:-else:, except (e1,e2)
- the hierarchy of exceptions
- raise, raise ex, assert
- event classes, except E as e, arg property
- self-defined exceptions, defining and using
Strings
- ASCII, UNICODE, UTF-8, codepoints, escape sequences
- ord(), chr(), literals
- indexing, slicing, immutability
- iterating through,
- concatenating, multiplying, comparing (against strings and numbers)
- in, not in
- .isxxx(), .join(), .split()
- .sort(), sorted(), .index(), .find(), .rfind()
Object-Oriented Programming
- ideas: class, object, property, method, encapsulation, inheritance, grammar vs class, superclass, subclass
- instance vs class variables: declaring, initializing
- __dict__ property (objects vs classes)
- private components (instance vs classes), name mangling
- methods: declaring, using, self parameter
- instrospection: hasattr() (objects vs classes), __name__, __module__, __bases__ properties
- inheritance: single, multiple, isinstance(), overriding, not is and is operators
- constructors: declaring and invoking
- polymorphism
- __name__, __module__, __bases__ properties, __str__() method
- multiple inheritance, diamonds
Miscellaneous (List Comprehensions, Lambdas, Closures, and I/O Operations)
- list comprehension: if operator, using list comprehensions
- lambdas: defining and using lambdas, self-defined functions taking lambda as arguments; map(), filter();
- closures: meaning, defining, and using closures
- I/O Operations: I/O modes, predefined streams, handles; text/binary modes
- open(), errno and its values; close()
- .read(), .write(), .readline(); readlines() (along with bytearray())
The course content above may change at any time without notice in order to better reflect the content of the PCAP examination.
|