Главная
Study mode:
on
1
Intro
2
WARNING
3
Code Golfing
4
Snake Oil' Benefits
5
What are Strokes?
6
Ever written code like this?
7
Counting up the strokes
8
Visual Diff
9
Initializing dict values
10
Cleaning Up Resources
11
Context Managers
12
Exception Handling
13
"Simple" implementation
14
Let's decorate with @contextmanager
15
Functions aren't scary
16
Quick Functions Primer
17
Goofus and Gallant Highlights
18
Goofus and Gallant explore functions
19
Goofus and Gallant explore map
20
Goofus and Gallant explore reduce
21
Goofus and Gallant explore filters
22
Comprehending Comprehensions
23
Comprehensions Deconstructed
24
Better Mapping with Comprehensions
25
Better Filtering with Comprehensions
26
Better Reduces with Compressions
27
Better dicts with Comprehensions
28
Where can conciseness help?
29
Quick Whiteboarding Tip
30
Final Takeaways • Stroke reduction (making code more concise) reduces the cognitive load to understand code.
Description:
Explore the art of code golfing in Python through this 27-minute EuroPython Conference talk. Discover techniques to minimize code length while maintaining functionality and readability. Learn about default values, tuple manipulation, list comprehensions, functional programming concepts, and context managers. Gain insights into writing more Pythonic and concise code that enhances understanding for future readers. Apply these strategies to reduce cognitive load and improve code clarity in your own projects.

Teeing up Python - Code Golf

EuroPython Conference
Add to list