parameters: (value)
docstring: Get GC property.
docstring_summary: Get GC property.
docstring_tokens: Get GC property .
function: def get_gc_property(value):
      """Get GC property."""
  
      if value.startswith('^'):
          negate = True
          value = value[1:]
      else:
          negate = False
  
      value = unidata.unicode_alias['generalcategory'].get(value, value)
  
      assert 1 <= len(value) <= 2, 'Invalid property!'
  
      if not negate:
          p1, p2 = (value[0], value[1]) if len(value) > 1 else (value[0], None)
          return ''.join(
              [v for k, v in unidata.unicode_properties.get(p1, {}).items() if not k.startswith('^')]
          ) if p2 is None else unidata.unicode_properties.get(p1, {}).get(p2, '')
      else:
          p1, p2 = (value[0], value[1]) if len(value) > 1 else (value[0], '')
          return unidata.unicode_properties.get(p1, {}).get('^' + p2, '')
function_tokens: def get_gc_property ( value ) : if value . startswith ( '^' ) : negate = True value = value [ 1 : ] else : negate = False value = unidata . unicode_alias [ 'generalcategory' ] . get ( value , value ) assert 1 <= len ( value ) <= 2 , 'Invalid property!' if not negate : p1 , p2 = ( value [ 0 ] , value [ 1 ] ) if len ( value ) > 1 else ( value [ 0 ] , None ) return '' . join ( [ v for k , v in unidata . unicode_properties . get ( p1 , { } ) . items ( ) if not k . startswith ( '^' ) ] ) if p2 is None else unidata . unicode_properties . get ( p1 , { } ) . get ( p2 , '' ) else : p1 , p2 = ( value [ 0 ] , value [ 1 ] ) if len ( value ) > 1 else ( value [ 0 ] , '' ) return unidata . unicode_properties . get ( p1 , { } ) . get ( '^' + p2 , '' )