]> granicus.if.org Git - python/commitdiff
Addresses the other half of Bug #112634 -- the documentation suggested
authorGuido van Rossum <guido@python.org>
Thu, 24 Aug 2000 16:20:32 +0000 (16:20 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 24 Aug 2000 16:20:32 +0000 (16:20 +0000)
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?)

Doc/lib/liburllib.tex

index 3eb126549b644f82d60a90da64f8288420df07c2..a41f7287c7401b7c47530c678b6903f0191844bc 100644 (file)
@@ -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}