Strong/weak typing
Mel
mwilson at the-wire.com
Fri Aug 1 22:47:04 EDT 2008
MartinRinehart at gmail.com wrote:
> I'm writing Python as if it were strongly typed, never recycling a
> name to hold a type other than the original type.
>
> Is this good software engineering practice, or am I missing something
> Pythonic?
Nothing wrong with what you're doing. I've never come up with a really
convincing reason to recycle names. Possibly something that follows the
evolution of the data:
middle_name = raw_input ('Name?')
middle_name = middle_name.split()
middle_name = middle_name[1]
It works, but I don't like it enough to actually use it.
Mel.
More information about the Python-list
mailing list