Kaydet (Commit) 3cdf24bc authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

Minor edits; add an item

üst 696cf43b
...@@ -512,9 +512,9 @@ generators: ...@@ -512,9 +512,9 @@ generators:
\exception{GeneratorExit} or \exception{StopIteration}; catching the \exception{GeneratorExit} or \exception{StopIteration}; catching the
exception and doing anything else is illegal and will trigger exception and doing anything else is illegal and will trigger
a \exception{RuntimeError}. \method{close()} will also be called by a \exception{RuntimeError}. \method{close()} will also be called by
Python's garbage collection when the generator is garbage-collected. Python's garbage collector when the generator is garbage-collected.
If you need to run cleanup code in case of a \exception{GeneratorExit}, If you need to run cleanup code when a \exception{GeneratorExit} occurs,
I suggest using a \code{try: ... finally:} suite instead of I suggest using a \code{try: ... finally:} suite instead of
catching \exception{GeneratorExit}. catching \exception{GeneratorExit}.
...@@ -1143,6 +1143,13 @@ added by Fredrik Lundh and Andrew Dalke at the NeedForSpeed ...@@ -1143,6 +1143,13 @@ added by Fredrik Lundh and Andrew Dalke at the NeedForSpeed
sprint. Character map decoding was improved by Walter D\"orwald.) sprint. Character map decoding was improved by Walter D\"orwald.)
% Patch 1313939 % Patch 1313939
\item The \function{long(\var{str}, \var{base})} function is now
faster on long digit strings because fewer intermediate results are
calculated. The peak is for strings of around 800--1000 digits where
the function is 6 times faster.
(Contributed by Alan McIntyre and committed at the NeedForSpeed sprint.)
% Patch 1442927
\item The \module{struct} module now compiles structure format \item The \module{struct} module now compiles structure format
strings into an internal representation and caches this strings into an internal representation and caches this
representation, yielding a 20\% speedup. (Contributed by Bob Ippolito representation, yielding a 20\% speedup. (Contributed by Bob Ippolito
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment