append function problem?

bruno at modulix onurb at xiludom.gro
Fri Apr 28 06:36:47 EDT 2006


randomtalk at gmail.com wrote:
> hello, recently i tried to use list.append() function in seemingly
> logical ways, 

What seems logical and how it really works may not be the same... As a
general rule, for builtin types, destructive methods returns None. I
personnaly find it a wart, but what, it's the BDFL's choice.

(snip)

> I'm not sure why seed1 and the function doesn't recognize the list..

because list.append() modifys the list in place and returns None.


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list