Logo Search packages:      
Sourcecode: virt-manager version File versions  Download package

def virtManager::IPy::IP::__getitem__ (   self,
  key 
)

Called to implement evaluation of self[key].

>>> ip=IP('127.0.0.0/30')
>>> for x in ip:
...  print str(x)
...
127.0.0.0
127.0.0.1
127.0.0.2
127.0.0.3
>>> print str(ip[2])
127.0.0.2
>>> print str(ip[-1])
127.0.0.3

Reimplemented from virtManager::IPy::IPint.

Definition at line 927 of file IPy.py.

00927                               :
        """Called to implement evaluation of self[key].
        
        >>> ip=IP('127.0.0.0/30')
        >>> for x in ip:
        ...  print str(x)
        ...
        127.0.0.0
        127.0.0.1
        127.0.0.2
        127.0.0.3
        >>> print str(ip[2])
        127.0.0.2
        >>> print str(ip[-1])
        127.0.0.3
        """
        return IP(IPint.__getitem__(self, key))

    def __repr__(self):


Generated by  Doxygen 1.6.0   Back to index