#NEWLINE# def _explode_shorthand_ip_string( self ) : #NEWLINE# #INDENT# 'Expand a shortened IPv6 address.\n\n        Args:\n            ip_str: A string, the IPv6 address.\n\n        Returns:\n            A string, the expanded IPv6 address.\n\n        ' #NEWLINE# if isinstance ( self , IPv6Network ) : #NEWLINE# #INDENT# ip_str = str ( self . network_address ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( self , IPv6Interface ) : #NEWLINE# #INDENT# ip_str = str ( self . ip ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ip_str = str ( self ) #NEWLINE# #UNINDENT# #UNINDENT# ip_int = self . _ip_int_from_string ( ip_str ) #NEWLINE# hex_str = ( '%032x' % ip_int ) #NEWLINE# parts = [ hex_str [ x : ( x + 4 ) ] for x in range ( 0 , 32 , 4 ) ] #NEWLINE# if isinstance ( self , ( _BaseNetwork , IPv6Interface ) ) : #NEWLINE# #INDENT# return ( '%s/%d' % ( ':' . join ( parts ) , ip_int . _prefixlen ) ) #NEWLINE# #UNINDENT# return ':' . join ( parts )