parameter list notation

Steve Holden steve at holdenweb.com
Tue Sep 4 19:11:18 EDT 2007


TheFlyingDutchman wrote:
> On Sep 4, 1:53 pm, Steven D'Aprano <st... at REMOVE-THIS-
> cybersource.com.au> wrote:
>> 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
> 
> Oh, I forgot the context of the discussion! As you are well aware, my
> Python fork() (which I am now calling PIEthun 3.01 in beta and PIEthun
> 3000 upon release) has made a few changes. Tuples are known as arrays.
> Lists are known as uarrays (for updatable array) and the array module
> has been renamed to homo_uarray (homogenous_updatable_array was just
> too much typing).
> 
> In the future I will be sure to specify the context of my statements -
> whether PIEthunic or Pythonic in nature.
> 
> 
Perhaps you could move further discussions to comp.lang.piethun?

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list