User Tools

Site Tools


python_cheat_sheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
python_cheat_sheet [2010/06/18 18:26] ginkopython_cheat_sheet [2010/06/18 18:31] ginko
Line 82: Line 82:
 kwargs = {'arg1': [], 'arg2': 10, 'arg3': 'foo'} kwargs = {'arg1': [], 'arg2': 10, 'arg3': 'foo'}
 function_name(**kwargs)</code> function_name(**kwargs)</code>
 +  * Fonction anonyme (jettable, pour usage unique):<code python>lambda arg1, arg2: arg1 + arg2</code>Cf [[http://docs.python.org/tutorial/controlflow.html#lambda-forms|doc officielle]]
   * Test: <code python>if ((test1) & (test2))|(test3):</code>   * Test: <code python>if ((test1) & (test2))|(test3):</code>
  
python_cheat_sheet.txt · Last modified: 2015/01/02 13:03 by ginko