[EMAIL PROTECTED] wrote:
I'm writing Python as if it were strongly typed, never recycling a
name to hold a type other than the original type.

Names are bound to objects with types.

Is this good software engineering practice,

If you expand 'type' to 'category', then yes.

or am I missing something Pythonic?

Most Python code is or could be generic.

def sum(iterable,start):
  for item in iter(iterable):
    start += item
  return start

Iterable can be any collection that is homogeneous with respect to the class of start and the operation of addition. And throughout my code, I never use 'iterable' for anything other that a homegeneous-for-the-purpose collection. I would never, for instance, bind it to a number.

tjr

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to