New submission from Torsten Rottmann <[EMAIL PROTECTED]>:

The attached file produced the following result:

______________________
trott$ python2.5 p6.py
[]
[1234]
______________________

I expected both times the empty list since the print
statement prints just a defaulted parameter ("e") which
was defaulted to an empty list literal ("[]") and never set
by supplying an actual class parameter.

The object property "entries" appears to be shared by
both instances. Why?

----------
components: Build
files: p6.py
messages: 74624
nosy: trott
severity: normal
status: open
title: surprised by default list parameter
type: behavior
versions: Python 2.5, Python 2.5.3, Python 2.6
Added file: http://bugs.python.org/file11761/p6.py

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4098>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to