[issue15614] print statement not showing valid result

2012-08-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is not a bug. extend is a procedure with a side effect: the "self" object (i.e. "a" in your example) is modified. By convention, procedures return None in Python, as opposed to functions, which have no side effect but return a result. This is to avoid co

[issue15614] print statement not showing valid result

2012-08-10 Thread laki
New submission from laki: Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 >>> a = [1,2] >>> b = [2,3] >>> a.extend(b) >>> a [1, 2, 2, 3] >>> print [1,2].extend([2,3]) None I did not test this in linux. -- components: Windows messages: 167859 nosy: lak