The meaning of "="
Piet van Oostrum
piet at cs.uu.nl
Tue Jul 14 16:59:34 EDT 2009
>>>>> aahz at pythoncraft.com (Aahz) (A) wrote:
>A> In article <m24otg3hkk.fsf at cs.uu.nl>, Piet van Oostrum
>A> <piet at cs.uu.nl> wrote:
>>> And to get c.x = 4 working you also need a __setitem__.
>A> Nope. You do need __setitem__ so that this works:
>A> c['x'] = 4
Sorry, I meant such that c.x = 4 does the same as c['x'] = 4 because
that was what the OP wanted (I think).
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list