data hiding/namespace pollution
lard at tardis.ed.ac.molar.uk
Mon Oct 31 12:39:37 CET 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:
>>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:
> 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.
Yup, I'm plannig on using pyunit. Didn't know about pychecker though,
thanks for that!
More information about the Python-list