avoid the redefinition of a function
D'Arcy Cain
darcy at druid.net
Wed Sep 12 09:51:44 EDT 2012
On Wed, 12 Sep 2012 14:56:12 +0200
Jabba Laci <jabba.laci at gmail.com> wrote:
> This will call the 2nd function. Now my functions are called step_ID
> (like step_27(), step_28(), etc.). How to avoid the danger of
> redefinition? Now, when I write a new function, I search for its name
> to see if it's unique but there must be a better way.
I think your real problem is how you name your functions. Give them
names that describe the operation that they do such as
step_get_finagle, step_update_konkle, etc. It's harder to duplicate
those unless you actually duplicate a function and it will make your
code much easier to read.
--
D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
IM: darcy at Vex.Net
More information about the Python-list
mailing list