Declaration of an array of unspecified size

Terry Reedy tjreedy at
Mon Sep 1 17:35:47 CEST 2003

"Bertel Lund Hansen" <nospamius at> wrote in message
news:n9q5lvscj9d6i083go88a9js7cc8g7c4ig at
> Yes. I have the habit from Java and C++. Is there a better way to
> declare them in Python?

Python is neither Java nore C++ and there are significant differences.
It requires different language specific habits.

> Yes, I saw that in another posting. But I have a habit that I
> aquired working with slow computers: always to substitute
> function-calls with variables (faster). Is that a bad habit?

Today's desktops literally match the supercomputers of enough years
ago and make many slow-computer habits (like writing lots of
assembler) generally obsolete.  The fast computer paradigm: write
something relatively simple that works.  If not fast enough (and it
often will be fast enough), then profile and optimize hotspots.

Terry J. Reedy

More information about the Python-list mailing list