too dynamic - how to avoid?

Tim Ottinger tottinge at indy.rr.com
Thu Oct 2 09:16:52 EDT 2003


On Thu, 02 Oct 2003 11:56:49 +0200, mic wrote:

> My stupid! But as the system becomes more complex, I begun
> to wonder how to avoid such situations in the future. Does anybody have some
> experiences about that?

1) Don't do it.
2) You can use a naming convention
   a) Methods have verbs, variables don't: set_temperature, temperature
   b) Prefix members with warts: x.temperature() x._temperature or
      x.its_temperature
   c) Your choice here
3) See #1, above

Pychecker doesn't seem to pick this up. I don't know about pylint.
I guess it might be something possible if you are talking methods
and attributes. 

Tim






More information about the Python-list mailing list