On 6/6/07, Neal Norwitz <[EMAIL PROTECTED]> wrote:
> This probably means there is a problem with marshalling the byte code
> out.  The first run compiles the .pyc files.  Theoretically this
> writes out the same thing in memory.  This isn't always the case
> though (ie, when there are bugs).
>
> A work around would be to just remove the .pyc files each time rather
> than do a make clean.  Do:
>
>   find . -name '*.pyc' -print0 | xargs -0 rm
>

Nope. Removing the byte-compiled Python files didn't change anything.

> Bonus points for finding the bug. :-)

Oh? :)

> A quick way to test this is to try to roundrip it.  Something like:
>
> >>> s = '''\
> ... class F:
> ...   def foo(self, *args):
> ...     print(self, args)
> ... '''
> >>> code = compile(s, 'foo', 'exec')
> >>> import marshal
> >>> marshal.loads(marshal.dumps(code)) == code
> True
>
> If it doesn't equal True, you found the problem.

I got True. So, the problem probably not the byte code.

-- Alexandre
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to