~/talk

Don't Do This

Talkat PyCon Australia 2013 · 2013-07-05..07-07· [python]
slides:none on file

Shows concrete gotchas and toys: that a class bases clause can be an expression used as an exception type, generators can yield exception classes, and function.__code__ swapping lets one function take another’s body. Demonstrates building code objects from XML via ElementTree/ast/compile and a custom importer (one trial provokes a segfault), using inspect.currentframe().f_back.f_locals to inject JSON into a caller, the pip install q runtime inspector, ctypes hacks to make modules callable and ForbiddenFruit’s curse to add methods to builtins. Works, but brittle.

AI-written summary · about

  1. 0:00Start
  2. 0:07Richard Jones
  3. 1:14Corner Cases of the Python Grammar
  4. 1:31Serialization
  5. 5:10Create Code Objects by Hand
  6. 5:59Abstract Syntax Tree
  7. 7:07Install the Pi Xml Loader
  8. 16:19Overloading of Methods
  9. 20:08Side-Effects
  10. 21:38How Does Callable Modules Enable Work
  11. 23:35Define the Structure
~/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.