+= append class operator
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

+= append class operator

From: <schwehr@gmail.com>
Date: Wed Apr 19 2006 - 19:15:31 CEST

Hi All,

This is probably a FAQ, but is there an operator mapping for += for
classes? Or does a += b get converted to a = a + b? I would like to
make this operator faster for the BitVector class, but I don't see +=
in http://docs.python.org/lib/operator-map.html

I could always create an append method, but += is nice and concise.

Thanks,
-kurt
Received on Sun Apr 30 23:38:26 2006