Python Wats: Uncovering Odd Behavior

12:30 PM - 01:00 PM on August 16, 2014, Room 704

Amy Hanlon

Audience level:
novice
Category:
Core Python
Watch:
http://youtu.be/eaPjfdsjSCA

Description

Some behavior of the Python interpreter is really weird. Have you ever wondered why you tend to get bugs when you have mutable default arguments? Or why you shouldn't use the is statement to determine equality of integers? Or why tuples are greater than strings but strings are greater than lists? Let's investigate these odd behaviors, and more, to learn what's really going on. You'll leave this talk with some practical knowledge of how to avoid common bugs and some fun Python trivia.

Abstract

Some behavior of the Python interpreter is really weird. Have you ever wondered why you tend to get bugs when you have mutable default arguments? Or why you shouldn't use the is statement to determine equality of integers? Or why tuples are greater than strings but strings are greater than lists? Let's investigate these odd behaviors, and more, to learn what's really going on. You'll leave this talk with some practical knowledge of how to avoid common bugs and some fun Python trivia.