[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
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.
nosy: afa, pypy-issue
title: classes in translator.platform should use tuples in the class attributes
PyPy development tracker <pypy-dev-issue at codespeak.net>
More information about the Pypy-issue