Commit Graph

452 Commits

Author SHA1 Message Date
Guido van Rossum c2e20744b2 PEP 343 -- the with-statement.
This was started by Mike Bland and completed by Guido
(with help from Neal).

This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.

There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
2006-02-27 22:32:47 +00:00
Neal Norwitz f9f61b4aa2 Note version added for conditional expressions 2006-02-27 16:31:12 +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
Fredrik Lundh 5a49fae1ab SF patch #1421726
fixed typo in language reference
2006-02-02 21:58:55 +00:00
Georg Brandl 5f0ff5c8e7 Add markup to a "Python Standard Library" doc reference I added for bug 839585. 2006-01-20 17:51:37 +00:00
Georg Brandl a635fbbcb0 Remove dots in \version{changed,added} argument and
correct argument order.
2006-01-15 07:55:35 +00:00
Georg Brandl c47f1c194a Bug #839585: mention % string operator in language ref 2005-12-26 23:15:48 +00:00
Armin Rigo ddddd2f7e6 Updating the short blob about old/new-style classes to reflect (IMHO) more
precisely the motivation and the differences.

Added links to www.python.org/doc/newstyle.html and a footnote to warn against
the statement "x[i] is equivalent to x.__getitem__(i)", which already caused
many invalid bug reports on SF.
2005-12-26 18:06:17 +00:00
Neal Norwitz 11ca77e6de Doc for PEP 341, needs improvement 2005-12-17 22:24:12 +00:00
Andrew M. Kuchling 6af5239501 Add placeholder section on old and new-style classes 2005-12-04 16:07:15 +00:00
Georg Brandl f96f5f5bbe Bug #1359053: Doc: \Uxxxxxxxx escapes _are_ interpreted in raw unicode strings 2005-11-22 19:23:58 +00:00
Martin v. Löwis ab0f947a21 Remove .cvsignore files, as they live in svn:ignore
properties now.
2005-10-30 22:01:41 +00:00
Fred Drake 59c61911ac add missing "and" 2005-10-30 04:29:49 +00:00
Neal Norwitz c0d11250af Make close brace a paren to match open. 2005-10-04 03:43:43 +00:00
Neal Norwitz 19f6b86955 Armin caught this mistake in bug #973103. 2005-10-04 03:37:29 +00:00
Raymond Hettinger bee0d467a1 Correct docs for empty raise when no exception is active. 2005-10-03 16:39:51 +00:00
Georg Brandl d430726b82 Better wording for integer ref entry. 2005-09-12 12:49:38 +00:00
Fred Drake b6e1c11004 note that the return and yield statements cannot be used at the top level in
exec statements; people coming from certain other languages seem to be
confused by this on a regular basis
2005-09-07 05:17:07 +00:00
Fred Drake b3dfc0ae5e - fix typo report by email, only 1.5 years late
- fix several consistency nits relating to \method{...()}
2005-09-07 04:57:56 +00:00
Georg Brandl 7da4edac28 Clarify what is meant with "whole numbers". 2005-09-04 18:30:19 +00:00
Georg Brandl 15ad935568 __new__ is a static method 2005-08-26 12:56:22 +00:00
Georg Brandl 8fc18a2010 bug [ 1261229 ] __new__ is class method 2005-08-25 21:56:45 +00:00
Georg Brandl 6cd5377c72 Empty sets and frozensets are also false. 2005-08-21 12:22:58 +00:00
Raymond Hettinger a30616a88d SF bug #1249837: container methods raise KeyError not IndexError
Minor clarification.
2005-08-21 11:26:14 +00:00
Georg Brandl b285974c00 Mention explicitly the False is considered false. 2005-08-21 09:41:21 +00:00
Fred Drake 21c825417f add information about alternate implementations, noting that documentation
for the implementation should be consulted
(thanks to Evelyn Mitchell for suggesting this)
2005-07-20 04:33:01 +00:00
Georg Brandl 1c330eb9eb Patch [ 1230615 ] Patch for (Doc) #1168746
Bug [ 1204734 ] incorrect description of __getattribute__
2005-07-02 10:27:31 +00:00
Neil Schemenauer c49322951f Fix grammar (it's -> its). 2005-06-18 17:54:13 +00:00
Andrew M. Kuchling 6a15c5d038 [Bug #1193001] Make the notation section use the same productionlist env. as other grammar rules 2005-06-02 13:50:19 +00:00
Michael W. Hudson 2f475a7bc8 Fix:
[ 1207501 ] Issue in grammar

We didn't define dotted_name in the pseudo-grammar in the reference
docs.  Backport candidate.
2005-05-26 07:58:22 +00:00
Fred Drake db22958f07 update documentation on what constitutes a line in a source file
(closes SF bug #1167922)
2005-05-25 05:29:17 +00:00
Raymond Hettinger b56b494bea SF bug #1190451: 6.9 First sentence is confusing
* Fixed incorrect wording:  expression->exception
* Noted the specific exception reported by "raise" when the is nothing
  to re-raise.
* Eliminated several instances of "e.g." as recommended in the style guide.
2005-04-28 07:18:47 +00:00
Raymond Hettinger f21569e53d Fix typo. 2005-04-26 05:18:53 +00:00
Brett Cannon 629496b77c Add grammar change for allowing ``class B(): pass`` syntax. 2005-04-09 03:03:00 +00:00
Greg Ward ff564d3391 SF #1156412: document the __new__() static method
(merge from release24-maint branch).
2005-03-08 01:10:20 +00:00
Michael W. Hudson a2a9888f22 Updates to the exceptions documentation (this is my patch #1156102). 2005-03-04 14:33:32 +00:00
Fred Drake b184ae860e fix a bunch of spelling errors
(closes SF patch #1104868)
2005-01-19 03:39:17 +00:00
Raymond Hettinger 68804315e0 SF Patch #1093896: miscellaneous doc typos 2005-01-01 00:28:46 +00:00
Johannes Gijsbers f4a70f35b0 Patch #1080684: typo repair. Thanks George Yoshida!
- Doc/lib/libbase64.tex
s/algorith/algorithm

- Doc/lib/libpickle.tex
s/interchangable/interchangeable

- Doc/lib/libxmlrpclib.tex
s/{_cmp__}/{__cmp__}

leading underscore needs to be double, not single.

- Doc/ref/ref6.tex
0/1 => False/True
2004-12-12 16:52:40 +00:00
Fred Drake 2269d86598 Fix SF bug #1061770: Manual typesets bit-shift operators as guillemet 2004-11-11 06:14:05 +00:00
Fred Drake 5b00059110 minor markup nits; fix missing whitespace 2004-11-10 16:51:17 +00:00
Fred Drake 7fabaf8375 clarify discussion of iteration in the section on the "for" statement
(SF bug #829073)
2004-11-02 19:18:20 +00:00
Fred Drake 9a40851569 clarify trailing comma in function argument list
(SF bug #798652)
2004-11-02 18:57:33 +00:00
Johannes Gijsbers 7126976ee8 Patch #1042969: add closing brace for \token {generator_expression}. Thanks
George Yoshida!
2004-10-09 15:52:04 +00:00
Martin v. Löwis 266a436fe2 Remove claims that Python source code is ASCII. Fixes #1026038. 2004-09-14 07:52:22 +00:00
Anthony Baxter 1a4ddaecc7 SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar
baz, bongo)"
2004-08-31 10:07:13 +00:00
Martin v. Löwis ae075b6cb7 Patch #1011144: Correct regex for coding decls. 2004-08-18 13:25:05 +00:00
Michael W. Hudson 0ccff074cd This is Mark Russell's patch:
[ 1009560 ] Fix @decorator evaluation order

From the description:

Changes in this patch:

- Change Grammar/Grammar to require
newlines between adjacent decorators.

- Fix order of evaluation of decorators
in the C (compile.c) and python
(Lib/compiler/pycodegen.py) compilers

- Add better order of evaluation check
to test_decorators.py (test_eval_order)

- Update the decorator documentation in
the reference manual (improve description
of evaluation order and update syntax
description)

and the comment:

Used Brett's evaluation order (see
http://mail.python.org/pipermail/python-dev/2004-August/047835.html)

(I'm checking this in for Anthony who was having problems getting SF to
talk to him)
2004-08-17 17:29:16 +00:00
Raymond Hettinger 5c8d29cb13 SF patch #872326: generator expression implementation
(Contributed by Jiwon Seo.)

Add genexps to the reference manual.
2004-08-15 23:28:10 +00:00
Michael W. Hudson 5e897959db This is my patch
[ 1004703 ] Make func_name writable

plus fixing a couple of nits in the documentation changes spotted by MvL
and a Misc/NEWS entry.
2004-08-12 18:12:44 +00:00