On Thu, Apr 22, 2010 at 11:46 AM, Robert Kern
<email address hidden> wrote:
> In LineInfo.ofind(), when ifun is "print", check if the compiler has
> recorded the "from __future__ import print_function":
>
> import __future__
>
> def ofind(self, ip):
> ...
> if self.ifunc == 'print':
> if not ip.shell.compile.compiler.flags & __future__.CO_FUTURE_PRINT_FUNCTION:
> return {'found': False, 'obj': None, ...}
Aha thanks! I looked around for this flag by reading the compiler
source code, but I failed to find this.
OK, with this info in hand, we can fix this damned bug quickly, which
is awfully irksome.
On Thu, Apr 22, 2010 at 11:46 AM, Robert Kern compile. compiler. flags & __future_ _.CO_FUTURE_ PRINT_FUNCTION:
<email address hidden> wrote:
> In LineInfo.ofind(), when ifun is "print", check if the compiler has
> recorded the "from __future__ import print_function":
>
> import __future__
>
> def ofind(self, ip):
> ...
> if self.ifunc == 'print':
> if not ip.shell.
> return {'found': False, 'obj': None, ...}
Aha thanks! I looked around for this flag by reading the compiler
source code, but I failed to find this.
OK, with this info in hand, we can fix this damned bug quickly, which
is awfully irksome.
Cheers,
f