This has been asked extensively before, here and elsewhere.

On Tue, Jul 14, 2009 at 09:52, Xavier Ho<cont...@xavierho.com> wrote:
> Why doesn't the second output print [1, 2, 3, .... , 7, 8, 9] ?
> The code is run at: http://codepad.org/wgLU4JZh
>
> class A():
>     def __init__(self):
>         self.n = [1, 2, 3, 4, 5]
>
> a = A()
> print a.n
> print a.n.extend([6, 7, 8, 9])
>
> #Output:
> #[1, 2, 3, 4, 5]
> #None
>
> I really don't know, but I'm probably missing something. Any pointers would
> be great.
>
> Best regards,
>
> Ching-Yun "Xavier" Ho, Technical Artist
>
> Contact Information
> Mobile: (+61) 04 3335 4748
> Skype ID: SpaXe85
> Email: cont...@xavierho.com
> Website: http://xavierho.com/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>



-- 
Pablo Torres N.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to