In article <[EMAIL PROTECTED]>,
Peter Dembinski <[EMAIL PROTECTED]> wrote:
.
.
.
>def foo(x):
> return str(x)
>
>str = foo(x)
>
>And now, let's say that foo()'s definition is in another module.
>It is hard for a programmer to quickly determine the type for str,
>that's the problem with programming in languages that don't have
>type declarations.
I think I don't understand. I believe you're saying that Python and
C might code homologously as
def py_foo(x)
return py_bar(x)
and
char *C_foo(int x)
{
return C_bar(x);
}
and that these definitions make it evident that C_foo() returns a
(char *), while there's no such manifest restriction on the type
of py_foo(). Well, yes, that's so (but what did it have to do with
definitions in another module?). There's nothing peculiar in this
to functions, right? Python declares types of *no* bindings, so
your claim is equally true of local variables, correct?
And this is all a *benefit* of Python, at least as I see it. Yes,
good style in Python is different from good style in C, but the
former's strong implicit typing has, I think, equal claim to
virtue.
Type in C are so epiphenomenal. They communicate little of what *I*
need to know.
--
http://mail.python.org/mailman/listinfo/python-list