On Sun, 17 Feb 2002, Daniel Pearson wrote:

> On Sun, Feb 10, 2002, Shlomi Fish <[EMAIL PROTECTED]> wrote the 
>following:
> > I am usually experienced enough with enought technologies to know if
> > something is missing. For instance, when I hacked a Python script I found,
> > I was looking for a way to concatenate two arrays (i.e: the equivalent of
> > @a,@b in perl) because I knew I've seen it in Perl. I eventaully could not
> > find a Python primitive to do it, and I even found a web-page that said
> > Python did not have such. (a,b in python will give an array containing
> > the array "a" as its first element and "b" as its second. %-))
>
> Forgive me for picking on such a minor point, but I can't bear to see my
> beloved Python maligned by the notion that it has no primitive operation for
> concatenating arrays.  Such an operation is incredibly simple in Python, as the
> following snippet from a session with the interactive Python interpreter shows:
>
>     >>> a = [1, 2, 3]
>     >>> b = [4, 5, 6, 7]
>     >>> c = a + b
>     >>> print c
>     [1, 2, 3, 4, 5, 6, 7]
>

Gotcha. So, + is used for numeric addition, string concatenation and array
concatenation. OK.

> This operation is very well documented in both the Python Tutorial
> <http://www.python.org/doc/current/tut/node5.html#SECTION005140000000000000000>
> and in the Python Library Reference
> <http://www.python.org/doc/current/lib/typesseq.html>.
>

All I know is that I could not find it when I looked for it.

Regards,

        Shlomi Fish

> --
> {   Daniel Jacob Pearson   |               sensible driver at             }
> {    <[EMAIL PROTECTED]>    |                 -- jeff covey                }
>



----------------------------------------------------------------------
Shlomi Fish        [EMAIL PROTECTED]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [EMAIL PROTECTED]

"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to