<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/symtable.c, branch v2.4.4</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>SF patch #872326:  Generator expression implementation</title>
<updated>2004-05-19T08:20:33+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-05-19T08:20:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=354433a59dd1701985ec8463ced25a967cade3c1'/>
<id>354433a59dd1701985ec8463ced25a967cade3c1</id>
<content type='text'>
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for SF [ 734869 ] Lambda functions in list comprehensions</title>
<updated>2003-05-21T17:34:50+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2003-05-21T17:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4d508adae3101434ae62be1c140e9877673dc257'/>
<id>4d508adae3101434ae62be1c140e9877673dc257</id>
<content type='text'>
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module.  Repair by move tmpname into the symtable entry.

Bugfix candidate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module.  Repair by move tmpname into the symtable entry.

Bugfix candidate.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a comment explaining the st_symbols cache.</title>
<updated>2001-12-10T00:53:18+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-12-10T00:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2990640d8af1d1fd6ba264ced46e741b9dc091d0'/>
<id>2990640d8af1d1fd6ba264ced46e741b9dc091d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>PySymtableEntry_New():  I'm not sure what this routine is doing, but it</title>
<updated>2001-12-08T23:40:38+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-12-08T23:40:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0f2d4b84a60e6064640f09c8010dedeaa9453f14'/>
<id>0f2d4b84a60e6064640f09c8010dedeaa9453f14</id>
<content type='text'>
was obviously leaking an int object when whatever the heck it's looking for
was found.  Repaired that.  This accounts for why entering function and
class definitions at an interactive prompt leaked a reference to the
integer 1 each time.
Bugfix candidate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
was obviously leaking an int object when whatever the heck it's looking for
was found.  Repaired that.  This accounts for why entering function and
class definitions at an interactive prompt leaked a reference to the
integer 1 each time.
Bugfix candidate.
</pre>
</div>
</content>
</entry>
<entry>
<title>SF bug #488687 reported by Neal Norwitz</title>
<updated>2001-12-04T02:41:46+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-12-04T02:41:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=86424e333f1736591114da975c8d2926ba6f51f5'/>
<id>86424e333f1736591114da975c8d2926ba6f51f5</id>
<content type='text'>
The error for assignment to __debug__ used ste-&gt;ste_opt_lineno instead
of n-&gt;n_lineno.  The latter was at best incorrect; often the slot was
uninitialized.  Two fixes here: Use the correct lineno for the error.
Initialize ste_opt_lineno in PySymtable_New(); while there are no
current cases where it is referenced unless it has already been
assigned to, there is no harm in initializing it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The error for assignment to __debug__ used ste-&gt;ste_opt_lineno instead
of n-&gt;n_lineno.  The latter was at best incorrect; often the slot was
uninitialized.  Two fixes here: Use the correct lineno for the error.
Initialize ste_opt_lineno in PySymtable_New(); while there are no
current cases where it is referenced unless it has already been
assigned to, there is no harm in initializing it.
</pre>
</div>
</content>
</entry>
<entry>
<title>ste_repr(): Conversion of sprintf() to PyOS_snprintf() for buffer</title>
<updated>2001-11-28T21:36:28+00:00</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2001-11-28T21:36:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4b4ab20f2c07a0e555c0b982089448b5471f6521'/>
<id>4b4ab20f2c07a0e555c0b982089448b5471f6521</id>
<content type='text'>
overrun avoidance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
overrun avoidance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add optional docstrings to member descriptors.  For backwards</title>
<updated>2001-09-20T20:46:19+00:00</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-20T20:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6f7993765ac0989b5d13084240797913627a31d8'/>
<id>6f7993765ac0989b5d13084240797913627a31d8</id>
<content type='text'>
compatibility, this required all places where an array of "struct
memberlist" structures was declared that is referenced from a type's
tp_members slot to change the type of the structure to PyMemberDef;
"struct memberlist" is now only used by old code that still calls
PyMember_Get/Set.  The code in PyObject_GenericGetAttr/SetAttr now
calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef
argument.

As examples, I added actual docstrings to the attributes of a few
types: file, complex, instance method, super, and xxsubtype.spamlist.

Also converted the symtable to new style getattr.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
compatibility, this required all places where an array of "struct
memberlist" structures was declared that is referenced from a type's
tp_members slot to change the type of the structure to PyMemberDef;
"struct memberlist" is now only used by old code that still calls
PyMember_Get/Set.  The code in PyObject_GenericGetAttr/SetAttr now
calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef
argument.

As examples, I added actual docstrings to the attributes of a few
types: file, complex, instance method, super, and xxsubtype.spamlist.

Also converted the symtable to new style getattr.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merging the gen-branch into the main line, at Guido's direction.  Yay!</title>
<updated>2001-06-18T22:08:13+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-18T22:08:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5ca576ed0a0c697c7e7547adfd0b3af010fd2053'/>
<id>5ca576ed0a0c697c7e7547adfd0b3af010fd2053</id>
<content type='text'>
Bugfix candidate in inspect.py:  it was referencing "self" outside of
a method.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bugfix candidate in inspect.py:  it was referencing "self" outside of
a method.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved __future__ parser; still more to do</title>
<updated>2001-02-27T19:07:02+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-27T19:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4db62b1e14ed909d4bd574633a11c45455c76beb'/>
<id>4db62b1e14ed909d4bd574633a11c45455c76beb</id>
<content type='text'>
Makefile.pre.in: add target future.o

Include/compile.h: define PyFutureFeaters and PyNode_Future()
                   add c_future slot to struct compiling

Include/symtable.h: add st_future slot to struct symtable

Python/future.c: implementation of PyNode_Future()

Python/compile.c: use PyNode_Future() for nested_scopes support

Python/symtable.c: include compile.h to pick up PyFutureFeatures decl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Makefile.pre.in: add target future.o

Include/compile.h: define PyFutureFeaters and PyNode_Future()
                   add c_future slot to struct compiling

Include/symtable.h: add st_future slot to struct symtable

Python/future.c: implementation of PyNode_Future()

Python/compile.c: use PyNode_Future() for nested_scopes support

Python/symtable.c: include compile.h to pick up PyFutureFeatures decl
</pre>
</div>
</content>
</entry>
<entry>
<title>Preliminary support for future nested scopes</title>
<updated>2001-02-27T04:23:34+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-02-27T04:23:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=29906eef3a56c43a4cd68a8706c75844b2384e59'/>
<id>29906eef3a56c43a4cd68a8706c75844b2384e59</id>
<content type='text'>
compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1
           __future__ feature name: "nested_scopes"

symtable.h: Add st_nested_scopes slot.  Define flags to track exec and
    import star.

Lib/test/test_scope.py: requires nested scopes

compile.c: Fiddle with error messages.

    Reverse the sense of ste_optimized flag on
    PySymtableEntryObjects.  If it is true, there is an optimization
    conflict.

    Modify get_ref_type to respect st_nested_scopes flags.

    Refactor symtable_load_symbols() into several smaller functions,
    which use struct symbol_info to share variables.  In new function
    symtable_update_flags(), raise an error or warning for import * or
    bare exec that conflicts with nested scopes.  Also, modify handle
    for free variables to respect st_nested_scopes flag.

    In symtable_init() assign st_nested_scopes flag to
    NESTED_SCOPES_DEFAULT (defined in compile.h).

    Add preliminary and often incorrect implementation of
    symtable_check_future().

    Add symtable_lookup() helper for future use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1
           __future__ feature name: "nested_scopes"

symtable.h: Add st_nested_scopes slot.  Define flags to track exec and
    import star.

Lib/test/test_scope.py: requires nested scopes

compile.c: Fiddle with error messages.

    Reverse the sense of ste_optimized flag on
    PySymtableEntryObjects.  If it is true, there is an optimization
    conflict.

    Modify get_ref_type to respect st_nested_scopes flags.

    Refactor symtable_load_symbols() into several smaller functions,
    which use struct symbol_info to share variables.  In new function
    symtable_update_flags(), raise an error or warning for import * or
    bare exec that conflicts with nested scopes.  Also, modify handle
    for free variables to respect st_nested_scopes flag.

    In symtable_init() assign st_nested_scopes flag to
    NESTED_SCOPES_DEFAULT (defined in compile.h).

    Add preliminary and often incorrect implementation of
    symtable_check_future().

    Add symtable_lookup() helper for future use.
</pre>
</div>
</content>
</entry>
</feed>
