Загрузка страницы

Talk: Trey Hunner - Comprehensible Comprehensions

Presented by:
Trey Hunner

Finding list comprehensions incomprehensible? Having trouble figuring out when to use list comprehensions or just plain for loops? Are your coworkers overusing comprehensions?

Come to this talk and learn the how, when, and why of list comprehensions.

We’ll discuss:

why list comprehensions exist and why people use them (yes you can always use a loop instead)
how to use list, set, an dictionary comprehensions as well as generator expressions
when and how to easily turn a for loop into a comprehension
why list comprehensions are often hard to read and how to make your comprehensions readable
When to use generator expressions instead of list comprehensions
when and how not to use comprehensions (they’re not a replacement for all loops)
Comprehensions are a unique tool for a unique task. Even if you dislike them, understanding how they work will help you better understand the Python code you find in the wild.

You’ll leave this talk with a better appreciation for both the use cases for comprehensions in Python and an understand of when not to use them.

Видео Talk: Trey Hunner - Comprehensible Comprehensions канала PyCon US
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
15 апреля 2020 г. 21:43:40
00:32:40
Другие видео канала
Tutorial: Andrew Knight - Hands-On Web App Test AutomationTutorial: Andrew Knight - Hands-On Web App Test AutomationTALK / Josh Izaac / What are quantum computers, and how can we train them in Python?TALK / Josh Izaac / What are quantum computers, and how can we train them in Python?Tutorial - Pradeep Kumar Srinivasan, Jia Chen, Shannon Zhu: Python Types for Fun and ProfitTutorial - Pradeep Kumar Srinivasan, Jia Chen, Shannon Zhu: Python Types for Fun and ProfitCharlas - Laura Gutiérrez Funderburk: Reduciendo prejuicio en la inteligencia artificial...Charlas - Laura Gutiérrez Funderburk: Reduciendo prejuicio en la inteligencia artificial...SPONSOR WORKSHOP / Shay DeWael and Alissa Renz /SlackSPONSOR WORKSHOP / Shay DeWael and Alissa Renz /SlackCharlas - María Andrea Vignau: Bailo con tu sombra: Patch, stub, mockCharlas - María Andrea Vignau: Bailo con tu sombra: Patch, stub, mockTalk - Joseph Lucas: Serialization  More than picklingTalk - Joseph Lucas: Serialization More than picklingTutorials - Pavithra, Andrew, Dharhas: From RAGs to riches: Build an AI document inquiry web-appTutorials - Pavithra, Andrew, Dharhas: From RAGs to riches: Build an AI document inquiry web-appTalks - Valerio Maggio: Pythonic `functional` (`iter`)tools for your data challengesTalks - Valerio Maggio: Pythonic `functional` (`iter`)tools for your data challengesTALK / James Murphy / From 3 to 300 fps: NES Emulation in Python and CythonTALK / James Murphy / From 3 to 300 fps: NES Emulation in Python and CythonTutorials - Aya Elsayed, Rhythm Patel: No More Raw SQL: SQLAlchemy, ORMs & asyncioTutorials - Aya Elsayed, Rhythm Patel: No More Raw SQL: SQLAlchemy, ORMs & asyncioTalk: Rebeca Sarai - Privacy-preserving methods: Building secure projectsTalk: Rebeca Sarai - Privacy-preserving methods: Building secure projectsCharlas: Resolviendo crimenes con Python mediante el Procesamiento del Lenguaje Natural (NLP)Charlas: Resolviendo crimenes con Python mediante el Procesamiento del Lenguaje Natural (NLP)Sponsor Presentation - Fixing legacy code, one pull request at a timeSponsor Presentation - Fixing legacy code, one pull request at a timeTalks - Kevin Kho, Han Wang: Speed is Not All You Need for Data ProcessingTalks - Kevin Kho, Han Wang: Speed is Not All You Need for Data ProcessingTalks - Dan Craig: Testing Spacecraft with PytestTalks - Dan Craig: Testing Spacecraft with PytestPython Steering Council Community AddressPython Steering Council Community AddressTutorials - Kevin Lacaille, Mansi Shah: Eroding Coastlines: A Geospatial & Computer Vision AnalysisTutorials - Kevin Lacaille, Mansi Shah: Eroding Coastlines: A Geospatial & Computer Vision AnalysisMeet our Keynote Speakers: Simon WillisonMeet our Keynote Speakers: Simon WillisonCharlas - Luis Conejo: De cero a 200 OK en 30 minutos  Desarrollo Web con Django, Heroku...Charlas - Luis Conejo: De cero a 200 OK en 30 minutos Desarrollo Web con Django, Heroku...Sponsor Presentations - State of Python Supply Chain Security (Sponsor: Alpha-Omega)Sponsor Presentations - State of Python Supply Chain Security (Sponsor: Alpha-Omega)
Яндекс.Метрика