Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 992d4a3

Browse files
committed
Merged revisions 56154-56264 via svnmerge from
svn+ssh://[email protected]/python/branches/p3yk ................ r56155 | neal.norwitz | 2007-07-03 08:59:08 +0300 (Tue, 03 Jul 2007) | 1 line Get this test working after converting map to return an iterator ................ r56202 | neal.norwitz | 2007-07-09 04:30:09 +0300 (Mon, 09 Jul 2007) | 37 lines Merged revisions 56124-56201 via svnmerge from svn+ssh://[email protected]/python/trunk ........ r56129 | georg.brandl | 2007-06-30 04:01:01 -0700 (Sat, 30 Jun 2007) | 2 lines Document smtp.SMTPAuthenticationError. ........ r56137 | georg.brandl | 2007-07-01 01:11:35 -0700 (Sun, 01 Jul 2007) | 2 lines Fix a few webbrowser.py problems. ........ r56143 | georg.brandl | 2007-07-02 04:54:28 -0700 (Mon, 02 Jul 2007) | 2 lines Remove duplicate sentence from alarm() doc. ........ r56170 | mark.hammond | 2007-07-03 19:03:10 -0700 (Tue, 03 Jul 2007) | 3 lines copy built files to the PCBuild directory, where tools like distutils or external build processes can find them. ........ r56176 | kurt.kaiser | 2007-07-05 15:03:39 -0700 (Thu, 05 Jul 2007) | 10 lines Many calls to tk.call involve an arglist containing a single tuple. Calls using METH_OLDARGS unpack this tuple; calls using METH_VARARG don't. Tcl's concatenation of args was affected; IDLE doesn't start. Modify Tkapp_Call() to unpack single tuple arglists. Bug 1733943 Ref http://mail.python.org/pipermail/python-checkins/2007-May/060454.html ........ r56177 | neal.norwitz | 2007-07-05 21:13:39 -0700 (Thu, 05 Jul 2007) | 1 line Fix typo in comment ........ ................ r56251 | neal.norwitz | 2007-07-11 10:01:01 +0300 (Wed, 11 Jul 2007) | 1 line Get working with map returning an iterator (had to fix whitespace too) ................ r56255 | thomas.wouters | 2007-07-11 13:41:37 +0300 (Wed, 11 Jul 2007) | 6 lines Clean up merge glitch or copy-paste error (the entire module was duplicated, except the first half even had some more copy-paste errors, referring to listcomps and genexps instead of setcomps) ................ r56256 | thomas.wouters | 2007-07-11 15:16:01 +0300 (Wed, 11 Jul 2007) | 14 lines Dict comprehensions. Still needs doc changes (like many python-3000 features ;-). It generates bytecode similar to: x = {} for k, v in (generator here): x[k] = v except there is no tuple-packing and -unpacking involved. Trivial measurement suggests it's significantly faster than dict(generator here) (in the order of 2 to 3 times as fast) but I have not done extensive measurements. ................ r56263 | guido.van.rossum | 2007-07-11 15:36:26 +0300 (Wed, 11 Jul 2007) | 3 lines Patch 1724999 by Ali Gholami Rudi -- avoid complaints about dict size change during iter in destroy call. ................
1 parent c6a55ee commit 992d4a3

18 files changed

Lines changed: 280 additions & 384 deletions

File tree

Doc/lib/libsignal.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ \section{\module{signal} ---
101101
be scheduled at any time). The returned value is then the number of
102102
seconds before any previously set alarm was to have been delivered.
103103
If \var{time} is zero, no alarm is scheduled, and any scheduled
104-
alarm is canceled. The return value is the number of seconds
105-
remaining before a previously scheduled alarm. If the return value
104+
alarm is canceled. If the return value
106105
is zero, no alarm is currently scheduled. (See the \UNIX{} man page
107106
\manpage{alarm}{2}.)
108107
Availability: \UNIX.

Doc/lib/libsmtplib.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ \section{\module{smtplib} ---
113113
The server refused our \samp{HELO} message.
114114
\end{excdesc}
115115

116+
\begin{excdesc}{SMTPAuthenticationError}
117+
SMTP authentication went wrong. Most probably the server didn't accept
118+
the username/password combination provided.
119+
\end{excdesc}
116120

117121
\begin{seealso}
118122
\seerfc{821}{Simple Mail Transfer Protocol}{Protocol definition for

Doc/tools/buildindex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ def __init__(self, link, str, seqno):
3636
str = pattern.sub(replacement, str)
3737
# build up the text
3838
self.text = split_entry_text(str)
39-
self.key = split_entry_key(str)
40-
39+
self.key = list(split_entry_key(str))
40+
4141
def __eq__(self, other):
4242
return cmp(self, other) == 0
43-
43+
4444
def __lt__(self, other):
4545
return cmp(self, other) == -1
46-
46+
4747
def __gt__(self, other):
4848
return cmp(self, other) == 1
4949

Grammar/Grammar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ subscript: test | [test] ':' [test] [sliceop]
108108
sliceop: ':' [test]
109109
exprlist: star_expr (',' star_expr)* [',']
110110
testlist: test (',' test)* [',']
111-
dictorsetmaker: ( (test ':' test (',' test ':' test)* [',']) |
111+
dictorsetmaker: ( (test ':' test (comp_for | (',' test ':' test)* [','])) |
112112
(test (comp_for | (',' test)* [','])) )
113113

114114
classdef: 'class' NAME ['(' [arglist] ')'] ':' suite

Include/Python-ast.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ struct _stmt {
184184

185185
enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
186186
IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8,
187-
SetComp_kind=9, GeneratorExp_kind=10, Yield_kind=11,
188-
Compare_kind=12, Call_kind=13, Num_kind=14, Str_kind=15,
189-
Bytes_kind=16, Ellipsis_kind=17, Attribute_kind=18,
190-
Subscript_kind=19, Starred_kind=20, Name_kind=21,
191-
List_kind=22, Tuple_kind=23};
187+
SetComp_kind=9, DictComp_kind=10, GeneratorExp_kind=11,
188+
Yield_kind=12, Compare_kind=13, Call_kind=14, Num_kind=15,
189+
Str_kind=16, Bytes_kind=17, Ellipsis_kind=18,
190+
Attribute_kind=19, Subscript_kind=20, Starred_kind=21,
191+
Name_kind=22, List_kind=23, Tuple_kind=24};
192192
struct _expr {
193193
enum _expr_kind kind;
194194
union {
@@ -238,6 +238,12 @@ struct _expr {
238238
asdl_seq *generators;
239239
} SetComp;
240240

241+
struct {
242+
expr_ty key;
243+
expr_ty value;
244+
asdl_seq *generators;
245+
} DictComp;
246+
241247
struct {
242248
expr_ty elt;
243249
asdl_seq *generators;
@@ -470,6 +476,9 @@ expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int
470476
#define SetComp(a0, a1, a2, a3, a4) _Py_SetComp(a0, a1, a2, a3, a4)
471477
expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int
472478
col_offset, PyArena *arena);
479+
#define DictComp(a0, a1, a2, a3, a4, a5) _Py_DictComp(a0, a1, a2, a3, a4, a5)
480+
expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
481+
lineno, int col_offset, PyArena *arena);
473482
#define GeneratorExp(a0, a1, a2, a3, a4) _Py_GeneratorExp(a0, a1, a2, a3, a4)
474483
expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
475484
col_offset, PyArena *arena);

Lib/bsddb/test/test_join.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ def test01_join(self):
7272
# create and populate primary index
7373
priDB = db.DB(self.env)
7474
priDB.open(self.filename, "primary", db.DB_BTREE, db.DB_CREATE)
75-
map(lambda t, priDB=priDB: priDB.put(*t), ProductIndex)
75+
[priDB.put(*t) for t in ProductIndex]
7676

7777
# create and populate secondary index
7878
secDB = db.DB(self.env)
7979
secDB.set_flags(db.DB_DUP | db.DB_DUPSORT)
8080
secDB.open(self.filename, "secondary", db.DB_BTREE, db.DB_CREATE)
81-
map(lambda t, secDB=secDB: secDB.put(*t), ColorIndex)
81+
[secDB.put(*t) for t in ColorIndex]
8282

8383
sCursor = None
8484
jCursor = None

Lib/lib-tk/Tkinter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ def __init__(self, master, widgetName, cnf={}, kw={}, extra=()):
19311931
k.configure(self, v)
19321932
def destroy(self):
19331933
"""Destroy this and all descendants widgets."""
1934-
for c in self.children.values(): c.destroy()
1934+
for c in list(self.children.values()): c.destroy()
19351935
self.tk.call('destroy', self._w)
19361936
if self._name in self.master.children:
19371937
del self.master.children[self._name]

Lib/sre_compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _mk_bitmap(bits):
280280

281281
# To represent a big charset, first a bitmap of all characters in the
282282
# set is constructed. Then, this bitmap is sliced into chunks of 256
283-
# characters, duplicate chunks are eliminitated, and each chunk is
283+
# characters, duplicate chunks are eliminated, and each chunk is
284284
# given a number. In the compiled expression, the charset is
285285
# represented by a 16-bit word sequence, consisting of one word for
286286
# the number of different chunks, a sequence of 256 bytes (128 words)

0 commit comments

Comments
 (0)