Home

On Mon, 03 Sep 2007 22:10:41 -0700, TheFlyingDutchman wrote:

> Well I did a search on "Python variable length arguments" and found a
> hit that seems to explain the *fields parameter:
>
> When you declare an argment to start with '*', it takes the argument
> list into an array.

No it doesn't.

>>> def test(*args):
.... import array
.... assert type(args) is array.array, "Not an array"
....
>>> test(1, 2, 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in test
AssertionError: Not an array




--
Steven.

previous
next

Re: What is best way to implement "tail"?
Re: about negative polar plots
Re: Stream state question
Re: Howto Launch a windows application ?
Re: Icons for GUI development
Krwinka
Dzieci Niczyje
Fundacja Sloneczko
Nasze Dzieci
Fundacja Hobbit