Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36042 > unrolled thread
| Started by | Andrew Berg <bahamutzero8825@gmail.com> |
|---|---|
| First post | 2013-01-03 03:27 -0600 |
| Last post | 2013-01-03 10:20 +0000 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.lang.python
Important questions about __future__ Andrew Berg <bahamutzero8825@gmail.com> - 2013-01-03 03:27 -0600
Re: Important questions about __future__ Ramchandra Apte <maniandram01@gmail.com> - 2013-01-03 01:43 -0800
Re: Important questions about __future__ Ramchandra Apte <maniandram01@gmail.com> - 2013-01-03 01:45 -0800
Re: Important questions about __future__ Ramchandra Apte <maniandram01@gmail.com> - 2013-01-03 01:45 -0800
Re: Important questions about __future__ Ramchandra Apte <maniandram01@gmail.com> - 2013-01-03 01:43 -0800
Re: Important questions about __future__ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-03 10:20 +0000
| From | Andrew Berg <bahamutzero8825@gmail.com> |
|---|---|
| Date | 2013-01-03 03:27 -0600 |
| Subject | Important questions about __future__ |
| Message-ID | <mailman.24.1357205269.2939.python-list@python.org> |
Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP 401, using print as a statement still raises a SyntaxError. Where is 'from __future__ import braces' implemented in CPython (it's not in __future__.py)? -- CPython 3.3.0 | Windows NT 6.2.9200.16461
[toc] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-03 01:43 -0800 |
| Message-ID | <10b6d5fe-ad73-4564-92f0-0f29d83f0d30@googlegroups.com> |
| In reply to | #36042 |
On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: > Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP > > 401, using print as a statement still raises a SyntaxError. > > Where is 'from __future__ import braces' implemented in CPython (it's > > not in __future__.py)? > > -- > > CPython 3.3.0 | Windows NT 6.2.9200.16461 barry_as_FLUFL is probably simply a joke future statement (Barry is at the head of Python Development and would probably replace Guido in the future) (Guido is typically only active on python-ideas). from __future__ import braces is the Future statement (see http://docs.python.org/3/library/__future__.html) import __future__ simply imports __future__.py as a plain, ordinary module
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-03 01:45 -0800 |
| Message-ID | <3d168777-fbfc-412f-ad63-822da175b730@googlegroups.com> |
| In reply to | #36043 |
On Thursday, 3 January 2013 15:13:44 UTC+5:30, Ramchandra Apte wrote: > On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: > > > Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP > > > > > > 401, using print as a statement still raises a SyntaxError. > > > > > > Where is 'from __future__ import braces' implemented in CPython (it's > > > > > > not in __future__.py)? > > > > > > -- > > > > > > CPython 3.3.0 | Windows NT 6.2.9200.16461 > > barry_as_FLUFL is probably simply a joke future statement (Barry is at the head of Python Development and would probably replace Guido in the future) (Guido is typically only active on python-ideas). > > from __future__ import braces is the Future statement (see http://docs.python.org/3/library/__future__.html) > > import __future__ simply imports __future__.py as a plain, ordinary module Link should have been http://docs.python.org/3/reference/simple_stmts.html#future --- Happy, new, joyful, etc new boring year.
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-03 01:45 -0800 |
| Message-ID | <mailman.27.1357206919.2939.python-list@python.org> |
| In reply to | #36043 |
On Thursday, 3 January 2013 15:13:44 UTC+5:30, Ramchandra Apte wrote: > On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: > > > Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP > > > > > > 401, using print as a statement still raises a SyntaxError. > > > > > > Where is 'from __future__ import braces' implemented in CPython (it's > > > > > > not in __future__.py)? > > > > > > -- > > > > > > CPython 3.3.0 | Windows NT 6.2.9200.16461 > > barry_as_FLUFL is probably simply a joke future statement (Barry is at the head of Python Development and would probably replace Guido in the future) (Guido is typically only active on python-ideas). > > from __future__ import braces is the Future statement (see http://docs.python.org/3/library/__future__.html) > > import __future__ simply imports __future__.py as a plain, ordinary module Link should have been http://docs.python.org/3/reference/simple_stmts.html#future --- Happy, new, joyful, etc new boring year.
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-03 01:43 -0800 |
| Message-ID | <mailman.26.1357206805.2939.python-list@python.org> |
| In reply to | #36042 |
On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: > Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP > > 401, using print as a statement still raises a SyntaxError. > > Where is 'from __future__ import braces' implemented in CPython (it's > > not in __future__.py)? > > -- > > CPython 3.3.0 | Windows NT 6.2.9200.16461 barry_as_FLUFL is probably simply a joke future statement (Barry is at the head of Python Development and would probably replace Guido in the future) (Guido is typically only active on python-ideas). from __future__ import braces is the Future statement (see http://docs.python.org/3/library/__future__.html) import __future__ simply imports __future__.py as a plain, ordinary module
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-01-03 10:20 +0000 |
| Message-ID | <50e55b7f$0$30003$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #36042 |
On Thu, 03 Jan 2013 03:27:42 -0600, Andrew Berg wrote:
> Does 'from __future__ import barry_as_FLUFL' do anything?
Yes, it re-enables <> and disables != as not equal:
py> sys.version
'3.3.0rc3 (default, Sep 27 2012, 18:44:58) \n[GCC 4.1.2 20080704 (Red Hat
4.1.2-52)]'
py> 1 <> 2
File "<stdin>", line 1
1 <> 2
^
SyntaxError: invalid syntax
py> from __future__ import barry_as_FLUFL
py> 1 <> 2
True
> Where is
> 'from __future__ import braces' implemented in CPython (it's not in
> __future__.py)?
It's defined in the C source code for the CPython compiler. Look in
future.c.
http://hg.python.org/cpython/file/944e86223d1f/Python/future.c
--
Steven
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web