def _split_optional_netmask(address):
 addr = str(address).split('/')
 if (len(addr) > 2):
  raise AddressValueError(("Only one '/' permitted in %r" % address))
 return addr

def _split_optional_netmask ( address ) : addr = str ( address ) . split ( '/' ) if ( len ( addr ) > 2 ) : raise AddressValueError ( ( "Only one '/' permitted in %r" % address ) ) return addr
helper to split the netmask and raise addressvalueerror if needed .