def has_extended_length(flags):
 return ((flags & _BGP_PA_EXTENDED_LENGTH) == _BGP_PA_EXTENDED_LENGTH)

def has_extended_length ( flags ) : return ( ( flags & _BGP_PA_EXTENDED_LENGTH ) == _BGP_PA_EXTENDED_LENGTH )
used in bgppathattr to check if the extended-length flag is set .