Python for PHP devs.
Table of Contents
Chapter 1 - The Encounter
Your PHP foundation is a powerful starting point!
Chapter 2 - Mind the Gap
Python’s Surprises: Concepts That Trip Up PHP Devs
- The Immutability
- The Tuple
- The REPL
Chapter 3 - The Basics
- Syntax Overview
- Data Types
- Everything is Object
- Numeric Objects
- String and Formatting
- Array (Tuple, List, Set)
- Dictionary
- Control Flow
- Error Handling
- Standard Library Features
argparse,datetime,logging
Chapter 3 - Functions, Files, and Loops
- Functions
- Functional Tools (
map,filter,itertoolsand list comprehensions) - Parameters (
*args,**kwargs) - File I/O
- Iterators and Generators
Chapter 4 - Packages, Modules, and Dependencies
- Modules, Packages & Environment
- The import system
- Python Package Managers 2. Managing Dependencies
- Virtual Environment
Chapter 5 - Object-Oriented Programming (OOP)
- OOP in Python
- Magic Methods
- Design Patterns
Chapter 6 - Testing and Linting
- Testing Frameworks
- Linting and Code Quality
- Continuous Integration(CI)
Chapter 7 - Web Development and Frameworks
- Web Frameworks
- Template Engins
- Routing, Middleware, and RESTful APIs
Chapter 8 - Advanced Topics
- Asynchronous Programming
async/await,asyncio, and event loop
- Concurrency and Parallelism
- GIL
- Threading and Multi-Processing
- Performance Optimization
Chapter 9 - Best Practices and Pitfalls
- Pythonic Idioms (Avoiding PHP-like anti-patterns)
- Common Pitfalls (Mutable defaults, scoping, and type hinting)
- Community and Resources (Python documentation, Stack Overflow, and forums)
Valuable Resources
- Bill Martin’s “Python for PHP Developers: Deep Dive” series link