<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/compile.h, branch v2.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/compile.h?h=v2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/compile.h?h=v2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-12-13T19:47:02Z</updated>
<entry>
<title>Add helper macro to get the number of free variables for a PyCodeObject.</title>
<updated>2001-12-13T19:47:02Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-12-13T19:47:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=12ce485b48430bdcf50b621e2e785c0079a7aebe'/>
<id>urn:sha1:12ce485b48430bdcf50b621e2e785c0079a7aebe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor future feature handling</title>
<updated>2001-08-10T21:38:04Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-08-10T21:38:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fdd12f66bb9740c7796441cd19db2a9d1502ee4f'/>
<id>urn:sha1:fdd12f66bb9740c7796441cd19db2a9d1502ee4f</id>
<content type='text'>
Replace individual slots in PyFutureFeatures with a single bitmask
with one field per feature.  The flags for this bitmask are the same
as the flags used in the co_flags slot of a code object.

    XXX This means we waste several bits, because they are used
    for co_flags but have no meaning for future statements.  Don't
    think this is an issue.

Remove the NESTED_SCOPES_DEFAULT define and others.  Not sure what
they were for anyway.

Remove all the PyCF_xxx flags, but define PyCF_MASK in terms of the
CO_xxx flags that are relevant for this release.

Change definition of PyCompilerFlags so that cf_flags matches
co_flags.
</content>
</entry>
<entry>
<title>Implement PEP 238 in its (almost) full glory.</title>
<updated>2001-08-08T05:00:18Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-08T05:00:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4668b000a1d9113394941ad39875c827634feb49'/>
<id>urn:sha1:4668b000a1d9113394941ad39875c827634feb49</id>
<content type='text'>
This introduces:

- A new operator // that means floor division (the kind of division
  where 1/2 is 0).

- The "future division" statement ("from __future__ import division)
  which changes the meaning of the / operator to implement "true
  division" (where 1/2 is 0.5).

- New overloadable operators __truediv__ and __floordiv__.

- New slots in the PyNumberMethods struct for true and floor division,
  new abstract APIs for them, new opcodes, and so on.

I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.

Not yet implemented are warnings (default off) when / is used with int
or long arguments.

This has been on display since 7/31 as SF patch #443474.

Flames to /dev/null.
</content>
</entry>
<entry>
<title>Part way to allowing "from __future__ import generators" to communicate</title>
<updated>2001-07-16T02:29:45Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-07-16T02:29:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ba58662817b708a453020f0425fe4747ea6d5cb'/>
<id>urn:sha1:5ba58662817b708a453020f0425fe4747ea6d5cb</id>
<content type='text'>
that info to code dynamically compiled *by* code compiled with generators
enabled.  Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags.  Perhaps I should not have?  I doubted it was
*intended* to be part of the public API, so just did.
</content>
</entry>
<entry>
<title>Preliminary support for "from __future__ import generators" to enable</title>
<updated>2001-07-15T21:08:29Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-15T21:08:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b09f7ed6235783fca27a4f8730c4c33e0f53c16c'/>
<id>urn:sha1:b09f7ed6235783fca27a4f8730c4c33e0f53c16c</id>
<content type='text'>
the yield statement.  I figure we have to have this in before I can
release 2.2a1 on Wednesday.

Note: test_generators is currently broken, I'm counting on Tim to fix
this.
</content>
</entry>
<entry>
<title>Enable nested scopes by default.</title>
<updated>2001-07-12T12:50:23Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-12T12:50:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=aa314298543132742efb5544ad202bb209136abf'/>
<id>urn:sha1:aa314298543132742efb5544ad202bb209136abf</id>
<content type='text'>
Although this is a one-character change, more work needs to be done:
the compiler can get rid of a lot of non-nested-scopes code, the
documentation needs to be updated, the future statement can be
simplified, etc.

But this change enables the nested scope semantics everywhere, and
that's the important part -- we can now test code for compatibility
with nested scopes by default.
</content>
</entry>
<entry>
<title>Merging the gen-branch into the main line, at Guido's direction.  Yay!</title>
<updated>2001-06-18T22:08:13Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-18T22:08:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ca576ed0a0c697c7e7547adfd0b3af010fd2053'/>
<id>urn:sha1:5ca576ed0a0c697c7e7547adfd0b3af010fd2053</id>
<content type='text'>
Bugfix candidate in inspect.py:  it was referencing "self" outside of
a method.
</content>
</entry>
<entry>
<title>If a code object is compiled with nested scopes, define the CO_NESTED flag.</title>
<updated>2001-03-22T02:32:48Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-22T02:32:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=061d106a0f56c5b4171ad8c56ecfaa6cefb27385'/>
<id>urn:sha1:061d106a0f56c5b4171ad8c56ecfaa6cefb27385</id>
<content type='text'>
Add PyEval_GetNestedScopes() which returns a non-zero value if the
code for the current interpreter frame has CO_NESTED defined.
</content>
</entry>
<entry>
<title>Useful future statement support for the interactive interpreter</title>
<updated>2001-03-01T22:59:14Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-01T22:59:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9f324e964e06c79f9c47501afa12b1af4cb1a75f'/>
<id>urn:sha1:9f324e964e06c79f9c47501afa12b1af4cb1a75f</id>
<content type='text'>
(Also remove warning about module-level global decl, because we can't
distinguish from code passed to exec.)

Define PyCompilerFlags type contains a single element,
cf_nested_scopes, that is true if a nested scopes future statement has
been entered at the interactive prompt.

New API functions:
    PyNode_CompileFlags()
    PyRun_InteractiveOneFlags()
    -- same as their non Flags counterparts except that the take an
       optional PyCompilerFlags pointer

compile.c: In jcompile() use PyCompilerFlags argument.  If
    cf_nested_scopes is true, compile code with nested scopes.  If it
    is false, but the code has a valid future nested scopes statement,
    set it to true.

pythonrun.c: Create a new PyCompilerFlags object in
    PyRun_InteractiveLoop() and thread it through to
    PyRun_InteractiveOneFlags().
</content>
</entry>
<entry>
<title>Presumed correct compiler pass for future statements</title>
<updated>2001-02-28T01:58:08Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-28T01:58:08Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=39e2f3f82499e2c06c092d38b77d554bee6f31e8'/>
<id>urn:sha1:39e2f3f82499e2c06c092d38b77d554bee6f31e8</id>
<content type='text'>
XXX still need to integrate into symtable API

compile.h: Remove ff_n_simple_stmt; obsolete.

           Add ff_found_docstring used internally to skip one and only
           one string at the beginning of a module.

compile.c: Add check for from __future__ imports to far into the file.

 	   In symtable_global() check for -1 returned from
	   symtable_lookup(), which signifies name not defined.

	   Add missing DECERF in symtable_add_def.

           Free c-&gt;c_future.

future.c:  Add special handling for multiple statements joined on a
	   single line using one or more semicolons; this form can
           include an illegal future statement that would otherwise be
           hard to detect.

	   Add support for detecting and skipping doc strings.
</content>
</entry>
</feed>
