Perl is worse!

William Tanksley wtanksle at dolphin.openprojects.net
Fri Jul 28 15:06:46 EDT 2000


On Fri, 28 Jul 2000 17:09:41 GMT, Steve Lamb wrote:

>    Yup.  "I'm going to use a, for what I know not.  Could be string, could be
>integer, could be whatever I want."  The point was defining the name and
>assiciate it with nothing.  But since the type is inferred on first use might
>as well have the C declarations.

Not at all.  The problem isn't that the type was inferred; the problem was
that the data was already given.  A better solution to your problem would
have been:

def extend(a):
 for x in range(10):
   a.append(x)

Now the type of a is truly not given, aside from the fact that it *must*
support the 'append' operation.

>         Steve C. Lamb

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list