~/talk

Migration from Python 2 to 3

Talkat PyCon US 2020 · 2020-04-15..04-23· [python]
links:none on file
slides:none on file

Shows exact migration steps: create two conda envs with Python 2.7 and 3.8, run JupyterLab, run futurize/pasteurize to apply staged fixes, and commit tests. Demonstrates converting a sample file (next() replacement, bytes/unicode literals, dict keys -> list, print(), range/zip behavior) so the output runs on both interpreters. Uses the python-future toolchain, documents ~50+ automated fixes (stage1 → stage2) and produces converted code that actually works.

AI-written summary · about

  1. 0:00Start
  2. 0:26About Myself
  3. 1:35Overview of the Differences between Python 2 and Python 3
  4. 2:54Development Environments
  5. 3:47Conda
  6. 6:21Activate the Environment
  7. 7:16Starting Jupiter Lab
  8. 10:56Jupiter Lab
  9. 11:43Markdown
  10. 12:45Terminal
  11. 14:11Differences between Python 2 and Python 3
  12. 15:08Print Function
  13. 18:54Iterators
  14. 30:51Comparisons
  15. 32:48Integers
  16. 34:52Floor Division
  17. 37:14Strings
  18. 38:37Python 3
  19. 42:44Hash Ability
  20. 43:30Hash Ability
  21. 49:16Metaclass
  22. 57:33Rounding
  23. 58:17Merchant Rounding
  24. 59:37Scoping of Exceptions
  25. 1:01:13New Syntax
  26. 1:05:24Unpacking
  27. 1:08:33List Comprehensions
  28. 1:10:10Built in Module
  29. 1:11:27Virus Operator
  30. 1:12:10Standard Library
  31. 1:14:13Solutions
  32. 1:17:49Cleaning Up Your Python 2 Code
  33. 1:19:06Classic Classes
  34. 1:22:26Not Equal Operator
  35. 1:23:21Exceptions
  36. 1:26:15No Leading Zero Numbers in Python 2
  37. 1:34:51Raw Input
  38. 1:35:48Python 3 Input
  39. 1:36:22Reload Module
  40. 1:44:06Converting Strategies
  41. 1:44:49External Libraries
  42. 1:48:01Absolute Absolute Imports
  43. 1:53:02Unicode Literal
  44. 1:54:14Version Testing
  45. 1:55:23Override Built-Ins
  46. 1:55:38Overwrite Built-Ins
  47. 1:59:05Back Ports
  48. 2:34:11Pasteurize
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.