Understanding the pythonic way: why a.x = 1 is better than a.setX(1) ?

Marco Bizzarri marco.bizzarri at gmail.com
Fri Sep 5 07:12:31 CEST 2008

On Thu, Sep 4, 2008 at 7:15 PM, Timothy Grant <timothy.grant at gmail.com> wrote:
> I think the most obvious solution to the problem is effective unit
> tests. If you type "a.y =1" and have a test that asserts a.x == 1 then
> you would quite quickly discover that you made a typo.
> --
> Stand Fast,
> tjg. [Timothy Grant]

Right; that is one of the things I try to do to avoid this sort of problems.

Marco Bizzarri

More information about the Python-list mailing list