[code.view]

[top] / python / PyMOTW / operator / operator_inplace.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2008 Doug Hellmann All rights reserved.
     #
     """
     """
     
     __version__ = "$Id$"
     #end_pymotw_header
     
     from operator import *
     
     a = -1
     b = 5.0
     c = [ 1, 2, 3 ]
     d = [ 'a', 'b', 'c']
     print 'a =', a
     print 'b =', b
     print 'c =', c
     print 'd =', d
     print
     
     a = iadd(a, b)
     print 'a = iadd(a, b) =>', a
     print
     
     c = iconcat(c, d)
     print 'c = iconcat(c, d) =>', c
     

[top] / python / PyMOTW / operator / operator_inplace.py

contact | logmethods.com