[PyPy-issue] [issue546] classes in translator.platform should use tuples in the class attributes
Amaury Forgeot d Arc
pypy-dev-issue at codespeak.net
Fri Jun 11 17:16:57 CEST 2010
New submission from Amaury Forgeot d Arc <amauryfa at gmail.com>:
in the code of pypy/translator/platform/*.py, it's too easy to forget that some
attributes are
lists, stored in the class dict:
flags = self.link_flags # a class attribute, Linux.link_flags
flags += ['-g'] # updates Linux.link_flags!
of course one should write "flags = self.link_flags[:]", but it would be safer
to turn them
into tuples, which are not mutables.
----------
effort: easy
messages: 1785
nosy: afa, pypy-issue
priority: bug
release: ???
status: unread
title: classes in translator.platform should use tuples in the class attributes
_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue546>
_______________________________________________________
More information about the Pypy-issue
mailing list