[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test/output test_coercion,1.2,1.3

Thomas Wouters thomas@xs4all.net
Thu, 4 Jan 2001 08:57:26 +0100


On Wed, Jan 03, 2001 at 05:36:27PM -0800, Neil Schemenauer wrote:
> Update of /cvsroot/python/python/dist/src/Lib/test/output
> In directory usw-pr-cvs1:/tmp/cvs-serv21710/Lib/test/output
> 
> Modified Files:
> 	test_coercion 
> Log Message:
> Sequence repeat works now for in-place multiply with an integer type
> as the left operand.  I don't know if this is a feature or a bug.

> ! 2 *= [1] => [1, 1]

It's a feature.

x = 2 * [1]

works, so

x = 2
x *= [1]

does, too. Obviously, '2 *= [1]' shouldn't, but I'm assuming you don't
actually execute that (it should give a SyntaxError)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!