Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47572
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-06-10 08:33 -0700 |
| Message-ID | <0bfe7bee-3df2-4fb8-8aad-c2124792b8b6@googlegroups.com> (permalink) |
| Subject | py_compile vs. built-in compile, with __future__ |
| From | dhyams <dhyams@gmail.com> |
The built-in compile() function has a "flags" parameter that one can use to influence the "__future__" mechanism. However, py_compile.compile, which I'm using to byte-compile code, doesn't have an equivalent means to do this.
Is this by design, or would this be considered a bug? I'm just wanting to do something like:
import __future__
py_compile.compile("foobar.py",flags=__future__.CO_FUTURE_DIVISION)
but there is no "flags" parameter to py_compile.compile().
It seems like this would be fixed just as easily as adding a "flags" parameter to py_compile.compile(), and then passing that through to the built-in compile(), which is called inside of py_compile.compile().
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 08:33 -0700
Re: py_compile vs. built-in compile, with __future__ Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 16:59 -0400
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 15:27 -0700
Re: py_compile vs. built-in compile, with __future__ Chris Angelico <rosuav@gmail.com> - 2013-06-11 08:36 +1000
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-10 16:31 -0700
Re: py_compile vs. built-in compile, with __future__ Neil Cerutti <neilc@norwich.edu> - 2013-06-11 15:37 +0000
Re: py_compile vs. built-in compile, with __future__ dhyams <dhyams@gmail.com> - 2013-06-11 14:25 -0700
Re: py_compile vs. built-in compile, with __future__ Neil Cerutti <neilc@norwich.edu> - 2013-06-12 13:30 +0000
csiph-web