smontanaro  committed d5449f1

backport from head

  • Participants
  • Parent commits f1fa7bb
  • Branches 2.4

Comments (0)

Files changed (1)

File Doc/lib/liburllib.tex

 import urllib
 class AppURLopener(urllib.FancyURLopener):
+    version = "App/1.7"
     def __init__(self, *args):
-        self.version = "App/1.7"
         urllib.FancyURLopener.__init__(self, *args)
 urllib._urlopener = AppURLopener()
 \mailheader{User-Agent} header of \samp{urllib/\var{VVV}}, where
 \var{VVV} is the \module{urllib} version number.  Applications can
 define their own \mailheader{User-Agent} header by subclassing
-\class{URLopener} or \class{FancyURLopener} and setting the instance
-attribute \member{version} to an appropriate string value before the
-\method{open()} method is called.
+\class{URLopener} or \class{FancyURLopener} and setting the class
+attribute \member{version} to an appropriate string value in the
+subclass definition.
 The optional \var{proxies} parameter should be a dictionary mapping
 scheme names to proxy URLs, where an empty dictionary turns proxies