data hiding/namespace pollution
Alex Hunsley
lard at tardis.ed.ac.molar.uk
Mon Oct 31 06:40:32 EST 2005
Jorge Godoy wrote:
> Alex Hunsley <lard at tardis.ed.ac.molar.uk> writes:
>
>
>>Sorry, I wasn't being clear. What I should have said is that I don't like the
>>idea of a typo in an assignment causing the assigning of the wrong thing.
>>e.g. imagine a simple value-holding class:
>>
>>class Values:
>> pass
>>
>>v = Values()
>>
>>v.conductoin = 10
>>
>>
>>... I meant to type 'conduction' in the source but spelt it wrong.
>>My value won't be there when elsewhere I refer to the correct attribute:
>>"conduction".
>
>
> Recently there was a big thread where that was raised again (yep, you're not
> the first, nor the second, nor the third...). You should write unittests, use
> tools like pychecker, pylint, etc.
Btw, can you recall the subject line of the thread? I'd like to google
groups for it and have a read of that thread...
ta!
alex
>
More information about the Python-list
mailing list