Back to index

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

List of all members.

Public Member Functions

def username
def password
def hostname
def port
def encode

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 156 of file parse.py.


Member Function Documentation

Definition at line 172 of file parse.py.

00172 
00173     def _hostinfo(self):
00174         netloc = self.netloc
00175         _, _, hostinfo = netloc.rpartition('@')
00176         _, have_open_br, bracketed = hostinfo.partition('[')
00177         if have_open_br:
00178             hostname, _, port = bracketed.partition(']')
00179             _, have_port, port = port.partition(':')
00180         else:
00181             hostname, have_port, port = hostinfo.partition(':')
00182         if not have_port:
00183             port = None
00184         return hostname, port
00185 

Here is the caller graph for this function:

Definition at line 160 of file parse.py.

00160 
00161     def _userinfo(self):
00162         netloc = self.netloc
00163         userinfo, have_info, hostinfo = netloc.rpartition('@')
00164         if have_info:
00165             username, have_password, password = userinfo.partition(':')
00166             if not have_password:
00167                 password = None
00168         else:
00169             username = password = None
00170         return username, password

Here is the caller graph for this function:

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

Definition at line 115 of file parse.py.

00115 
00116     def encode(self, encoding='ascii', errors='strict'):
00117         return self._encoded_counterpart(*(x.encode(encoding, errors) for x in self))
00118 

Here is the caller graph for this function:

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._NetlocResultMixinStr.__slots__ = () [static, private]

Reimplemented from urllib.parse._ResultMixinStr.

Reimplemented in urllib.parse.ParseResult, and urllib.parse.SplitResult.

Definition at line 157 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: