Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes
urllib.parse._NetlocResultMixinBytes Class Reference
Inheritance diagram for urllib.parse._NetlocResultMixinBytes:
Inheritance graph
[legend]
Collaboration diagram for urllib.parse._NetlocResultMixinBytes:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def username
def password
def hostname
def port
def decode

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Member Functions

def _userinfo
def _hostinfo

Static Private Attributes

tuple __slots__ = ()

Detailed Description

Definition at line 186 of file parse.py.


Member Function Documentation

Definition at line 202 of file parse.py.

00202 
00203     def _hostinfo(self):
00204         netloc = self.netloc
00205         _, _, hostinfo = netloc.rpartition(b'@')
00206         _, have_open_br, bracketed = hostinfo.partition(b'[')
00207         if have_open_br:
00208             hostname, _, port = bracketed.partition(b']')
00209             _, have_port, port = port.partition(b':')
00210         else:
00211             hostname, have_port, port = hostinfo.partition(b':')
00212         if not have_port:
00213             port = None
00214         return hostname, port
00215 

Here is the caller graph for this function:

Definition at line 190 of file parse.py.

00190 
00191     def _userinfo(self):
00192         netloc = self.netloc
00193         userinfo, have_info, hostinfo = netloc.rpartition(b'@')
00194         if have_info:
00195             username, have_password, password = userinfo.partition(b':')
00196             if not have_password:
00197                 password = None
00198         else:
00199             username = password = None
00200         return username, password

Here is the caller graph for this function:

def urllib.parse._ResultMixinBytes.decode (   self,
  encoding = 'ascii',
  errors = 'strict' 
) [inherited]

Definition at line 123 of file parse.py.

00123 
00124     def decode(self, encoding='ascii', errors='strict'):
00125         return self._decoded_counterpart(*(x.decode(encoding, errors) for x in self))
00126 

Definition at line 140 of file parse.py.

00140 
00141     def hostname(self):
00142         hostname = self._hostinfo[0]
00143         if not hostname:
00144             hostname = None
00145         elif hostname is not None:
00146             hostname = hostname.lower()
00147         return hostname

Here is the call graph for this function:

Definition at line 136 of file parse.py.

00136 
00137     def password(self):
00138         return self._userinfo[1]

Here is the call graph for this function:

def urllib.parse._NetlocResultMixinBase.port (   self) [inherited]

Definition at line 149 of file parse.py.

00149 
00150     def port(self):
00151         port = self._hostinfo[1]
00152         if port is not None:
00153             port = int(port, 10)
00154         return port
00155 

Here is the call graph for this function:

Definition at line 132 of file parse.py.

00132 
00133     def username(self):
00134         return self._userinfo[0]

Here is the call graph for this function:


Member Data Documentation

tuple urllib.parse._NetlocResultMixinBytes.__slots__ = () [static, private]

Reimplemented from urllib.parse._ResultMixinBytes.

Reimplemented in urllib.parse.ParseResultBytes, and urllib.parse.SplitResultBytes.

Definition at line 187 of file parse.py.

Definition at line 107 of file object.h.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


The documentation for this class was generated from the following file: