Re: Idle bytecode query on apparently unreachable returns

2005-10-12 Thread Tom Anderson
On Tue, 11 Oct 2005, Raymond Hettinger wrote: > [Tom Anderson]: > >> What puzzles me, though, are bytecodes 17, 39 and 42 - surely these >> aren't reachable? Does the compiler just throw in a default 'return >> None' epilogue, with routes there from every code path, even when it's >> not needed

Re: Idle bytecode query on apparently unreachable returns

2005-10-11 Thread Raymond Hettinger
[Tom Anderson]: > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when it's not > needed? If so, why? Since unreachable code is never executed, t

Idle bytecode query on apparently unreachable returns

2005-10-11 Thread sxanth
>What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't >reachable? Does the compiler just throw in a default 'return None' >epilogue, with routes there from every code path, even when it's not >needed? If so, why? Hi. pyc (http://freshmeat.net/projects/pyc) can already rem

Re: Idle bytecode query on apparently unreachable returns

2005-10-09 Thread Neal Norwitz
Tom Anderson wrote: > Evening all, > > Here's a brief chat with the interpretator: [snip] > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when

Re: Idle bytecode query on apparently unreachable returns

2005-10-09 Thread jepler
On Mon, Oct 10, 2005 at 12:20:13AM +0100, Tom Anderson wrote: > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when it's not > needed? If so,

Idle bytecode query on apparently unreachable returns

2005-10-09 Thread Tom Anderson
Evening all, Here's a brief chat with the interpretator: Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def fib(x): ... if (x == 1): ... return 1 ...