Enumming
John W. Baxter
jwbnews at scandaroon.com
Mon Aug 21 19:20:19 EDT 2000
In article <m3zom6uwo6.fsf at greebo.nodomain.de>, Bernhard Herzog
<herzog at online.de> wrote:
> Others have answered your question and I don't have to add anyting to
> that, so I'll pick the remaining nit:
>
> "Larry Whitley" <ldw at us.ibm.com> writes:
>
> > myList = []
> > for i in range( 10 ):
> > myList.append( functionA(), funcationB(), functionC(), functionD(),
> > functionE() )
>
> From Python 1.6 on the list's append method will only accept exactly one
> argument, so this will produce a TypeError.
>
> That it works now, despite being undocument, is a leftover from very
> early Python which had a different way to call C-methods.
Yes, but making the arguments into a single tuple will work now (at
least where "now" is Python 1.5.2) and in Python 1.6 (+):
myList.append( (functionA(), funcationB(), functionC(), functionD(),
functionE()) )
--John
--
John W. Baxter Port Ludlow, WA USA jwbnews at scandaroon.com
More information about the Python-list
mailing list