list.extend([]) Question

Aahz aahz at pythoncraft.com
Fri Feb 5 10:55:17 EST 2010


In article <088e7a24-b0d0-4d43-bee7-193e5eaefe57 at b7g2000pro.googlegroups.com>,
Dan Brown  <fsenzeru at gmail.com> wrote:
>
>Why does extending a list with the empty list result in None?  It
>seems very counterintuitive to me, at least --- I expected ['a'].extend
>([]) to result in ['a'], not None.

http://www.python.org/doc/faq/general/#why-doesn-t-list-sort-return-the-sorted-list
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity



More information about the Python-list mailing list