Yes, this is for _Python for Dummies_, so idioms that aren't in the
Cookbook are also fine.
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/
"Look, it's your affair if you want to play with five people, but don't
go calling it doubles." --John Cleese anticipates Usenet
Constants
Static methods / Class methods
Bunch
TaskQueue (Queue for easy and safe multithreading)
A decorator for type checking of function arguments, and/or for
require/ensure, and/or for similar features of other languages that people
find missing in Python.
Properties and in particular lazy properties. Why and how to avoid
getters/setters.
Dynamically import a module (name known at runtime, may or may not be
present).
Unittest/doctest.
1/ tuple- and dict-based dispatch, ie:
x = (result_if_false, result_if_true)[boolexpr]
y = {key1: result1, key2:result2, ...}[keyexpr]
2/ functions (and methods etc) as first-class objects (two main obvious
uses : callbacks and decorators)
+ (bonus) the combination of 1/ and 2/ !-)
3/ name-based lookups and affectations (getattr() / setattr()) and their
implementation ( __getattr__ / __setattr__)
If it's for _beginners_ / _dummies_, I would expect things like
1.6
names = ['George', 'Saddam', 'Osama']
name_string = ', '.join(names)
4.10
dict.setdefault(k, v)
?.?
dict = dict(zip(list_a, list_b))
- listcomps
2.1 / 2.2
reading/writing from/to files
?.?
string-methods like .split(), .upper(), endswith(), startswith(),
isalpha() ...