Differences between revisions 1 and 2
Revision 1 as of 2009-03-14 02:09:02
Size: 182
Editor: CarlNobile
Comment:
Revision 2 as of 2009-03-14 02:10:19
Size: 184
Editor: CarlNobile
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{ {{{
Line 13: Line 13:
}} }}}

ConditionalPython

In [11]: v = 'NULL'

In [12]: isinstance(v, int) and v or 0
Out[12]: 0

In [13]: v = 22

In [14]: isinstance(v, int) and v or 0
Out[14]: 22

ConditionalPython (last edited 2009-03-14 02:16:41 by CarlNobile)