list vs tuple

Sheila King sheila at
Thu Mar 29 04:58:03 CEST 2001

On Wed, 28 Mar 2001 09:40:38 -0800 (PST), "Sean 'Shaleh' Perry"
<shaleh at> wrote in comp.lang.python in article
<mailman.985801119.10859.python-list at>:

:On 28-Mar-2001 Brian Quinlan wrote:
:> I'm not sure that this is a reasonable piece of self documentation since
:> dir_list can change. It is the tuple ('/path', '/foo/bar', '/baz/bat/files')
:> that cannot change. Would you say that x = 5 documents that x cannot change?
:dir_list is declared as a tuple, which is as close to a const one can find in

>>> dir_list = ('/path', '/foo/bar', '/baz/bat/files')
>>> print dir_list
('/path', '/foo/bar', '/baz/bat/files')
>>> dir_list = ('/usr/bin/env', '/usr/bin', '')
>>> print dir_list
('/usr/bin/env', '/usr/bin', '')

I don't see how dir_list is a constant?

Sheila King

More information about the Python-list mailing list