List append help
Bill
Bill
Sun Mar 14 02:39:53 EST 2004
Thank you, This was really bugging me. To help me understand, do you know
why the return value was None even though it was added to the list? Also, I
don't like having to type "arg" on every other line neither, so I won't:-)
Miki Tebeka <miki.tebeka at zoran.com> wrote:
>
>Hello Bill,
>
>> Could someone please tell me why the "hireCrew"
>> method in the following code leaves me with a list that contains "None"?
> > ...
> > self.myCrew = self.myCrew.append(argHire)
>The return value of list.append is None. However it does add the item to
>the list. Try:
>self.myCrew.append(argHire)
>
>On a side note, I find this `arg' prefix for an argument irritating :-)
>
>HTH.
>Miki
More information about the Python-list
mailing list