Commit 3d0c77b3 authored by Guido van Rossum's avatar Guido van Rossum

Addresses the other half of Bug #112634 -- the documentation suggested

that you can set self.version *after* calling the base class __init__.
In fact it must be done *before*.

(Fred, maybe the version class variable should be documented now?)
parent ba311380
......@@ -176,8 +176,8 @@ accomplished with the following code:
\begin{verbatim}
class AppURLopener(urllib.FancyURLopener):
def __init__(self, *args):
apply(urllib.FancyURLopener.__init__, (self,) + args)
self.version = "App/1.7"
apply(urllib.FancyURLopener.__init__, (self,) + args)
urllib._urlopener = AppURLopener()
\end{verbatim}
......
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