Commit Graph

2243 Commits

Author SHA1 Message Date
Thomas Wouters
8622e93eab And some more cleanup. 2006-02-27 17:14:45 +00:00
Thomas Wouters
106203c6e0 Clean up from-import handling. 2006-02-27 17:05:19 +00:00
Jeremy Hylton
9ebfbf0a43 Simplify ast_for_trailer() in anticipation of more changes. 2006-02-27 16:50:35 +00:00
Thomas Wouters
aa8b6c5855 Fix old not-reading-pep-308-right artifact. 2006-02-27 16:46:22 +00:00
Martin v. Löwis
15e62742fa Revert backwards-incompatible const changes. 2006-02-27 16:46:16 +00:00
Thomas Wouters
fa443cda87 Fix assertion errors in debug build, brought on by PEP 308 patch. 2006-02-27 15:43:57 +00:00
Martin v. Löwis
577b5b960d Create _ast module.
Cleanup Python-ast.c generation.
2006-02-27 15:23:19 +00:00
Thomas Wouters
dca3b9c797 PEP 308 implementation, including minor refdocs and some testcases. It
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.

The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:

>>> (x for x in lambda:0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence

changes into

>>> (x for x in lambda: 0)
  File "<stdin>", line 1
    (x for x in lambda: 0)
                     ^
SyntaxError: invalid syntax

Since there's no way the former version can be useful, it's probably a
bugfix ;)
2006-02-27 00:24:13 +00:00
Martin v. Löwis
d3a5f53a27 Avoid reinitializing the types twice. 2006-02-27 00:09:50 +00:00
Martin v. Löwis
8d0701daf1 Stop generating empty arrays. 2006-02-26 23:40:20 +00:00
Neal Norwitz
59090a7334 Oops, I forgot to check this in with the change to Grammar/Grammar.
Implement change suggested by Jiwon Seo on python-dev.
['(' gen_for ')'] is redundant with test, so remove it.
2006-02-26 22:29:38 +00:00
Martin v. Löwis
2b366e41c3 Check whether there are flags. 2006-02-26 22:12:35 +00:00
Martin v. Löwis
ce1d5d2527 Fix iterating over cmpop_ty lists. 2006-02-26 20:51:25 +00:00
Martin v. Löwis
bd260da900 Generate code to recursively copy an AST into
a tree of Python objects. Expose this through compile().
2006-02-26 19:42:26 +00:00
Neal Norwitz
9a27617239 Based on discussion with Martin and Thomas on python-checkins
add a Py_SAFE_DOWNCAST() to make the code correct.
2006-02-20 18:57:39 +00:00
Neal Norwitz
20dd93f427 Fix compiler warning on amd64. We can't use zd here since this is
ultimately going to snprintf() not the python string formatter.  Right?
2006-02-19 19:34:15 +00:00
Neal Norwitz
a361bd8dce Fix compiler warning (int vs Py_ssize_t mismatch 2006-02-19 19:31:50 +00:00
Georg Brandl
1dc5a84aee Bug #801349: document that start/stop/step slice arguments can be None 2006-02-19 00:12:42 +00:00
Martin v. Löwis
dde99d2633 Remove size constraints in SLICE opcodes. 2006-02-17 15:57:41 +00:00
Martin v. Löwis
67baee6287 Move cast to suppress warning. 2006-02-16 14:37:48 +00:00
Martin v. Löwis
d96ee90993 Use Py_ssize_t to count the 2006-02-16 14:37:16 +00:00
Martin v. Löwis
720ddb625b Use PyString_FromFormat for formatting error messages. 2006-02-16 07:11:33 +00:00
Martin v. Löwis
18e165558b Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
Armin Rigo
f5b3e36493 Renamed _length_cue() to __length_hint__(). See:
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
2006-02-11 21:32:43 +00:00
Georg Brandl
b69406dc09 Update general copyright years to 2006. 2006-02-11 15:30:36 +00:00