[Python-Dev] new failing test -- test_compiler

Michael Hudson mwh at python.net
Sat Aug 7 22:47:22 CEST 2004


Tim Peters <tim.peters at gmail.com> writes:

>> This is the string it's trying to delete:
>> 
>> "abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
>
> FYI, that string appears only in shlex.py (split across two source
> lines).  Maybe that will help whittle it down.

Here's some code from Lib/compiler/transformer.py:

    def atom_string(self, nodelist):
        k = ''
        for node in nodelist:
            k += self.decode_literal(node[1])
        n = Const(k)
        n.lineno = nodelist[0][2]
        return n

what does this make you think of?  Yes, it's the new += string
optimizations; Python gets upset if you mutate interned strings...

Armin is on the case...

Cheers,
mwh

-- 
  Programming languages should be designed not by piling feature on
  top of feature, but by removing the weaknesses and restrictions
  that make the additional features appear necessary.
               -- Revised(5) Report on the Algorithmic Language Scheme


More information about the Python-Dev mailing list