[Baypiggies] August BayPIGgies meeting 8/23?

Stephen McInerney spmcinerney at hotmail.com
Mon Aug 20 02:20:40 CEST 2012

Do we have a meeting on Thu 8/23? If yes who is the speaker and topic, if I missed that?
baypiggies.net still says July, can it be updated?

I have a newbie (non-programmer, finance guy) friend and wanted to mention it to him.

In case there is nothing else planned, then one idea I'd had (and run by other people, most of whom
seemed to respond favorably) was a stone-soup-like
"Everyone pick a useful stdlib or third-party module and give an overview or idiom or
favorite lesser-known feature"

Stuff I could volunteer to do:

- collections.NamedTuple, Counter (found a few serious gotchas in Counter recently)

- idioms using csv (csv.DictRead is old and inflexible)
  good clean idioms for reading csv files, with headers; autoconverting by type;
  use a context handler; return each line as a new-style object with properties rather than

- minor comments on when to use iterators vs generators (need pushback?, storing state, and explicit FSMs)
  a) use a generator instead of iterator if you want the ability to pushback
  b) use a generator rather than iterator if you find yourself needing to store state in the iterator
  example of the explicit FSM you would need to write if you do depth-first traversal of a tree 

- (anyone know a good idiom for reading a file backwards in Python? and why is it not in stdlib?)

- I can do some BeautifulSoup/scraping/regex examples. Thought it would be a nice adjunct to
  Simeon's previous pandas talk, for escaping structured data (tables, etc.) directly off webpages. Reasonably robustly.

- Frederik Lundh's snippet for HTML-unescaping, which is inexplicably not in stdlib
- snippet: in re.sub(pattern, repl, ...),repl can be a function, not just a string

Nothing profound, just a pot-pourri of useful stuff and stdlib caveats/tips.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20120819/0715695f/attachment.html>

More information about the Baypiggies mailing list