nappy/na_file/na_core.py
def _attemptVarAndUnitsMatch(self, item):
        """
        If it can match variable name and units from the name it does and returns
        (var_name, units). Otherwise returns (item, None).
        """
        match = NACore.var_and_units_pattern.match(item)

        if match:
            (v1, units, v2) = match.groups()
            var_name = v1 + " " + v2
        else:
            (var_name, units) = (item, None)   
  
        return (var_name.strip(), units)

        If it can match variable name and units from the name it does and returns
        (var_name, units). Otherwise returns (item, None).
        
If it can match variable name and units from the name it does and returns
(var_name, units). Otherwise returns (item, None).
If it can match variable name and units from the name it does and returns ( var_name units ) . Otherwise returns ( item None ) .
def _attemptVarAndUnitsMatch(self, item):
        match = NACore.var_and_units_pattern.match(item)
        if match:
            (v1, units, v2) = match.groups()
            var_name = v1 + " " + v2
        else:
            (var_name, units) = (item, None)   
        return (var_name.strip(), units)
def _attemptVarAndUnitsMatch ( self , item ) : match = NACore . var_and_units_pattern . match ( item ) if match : ( v1 , units , v2 ) = match . groups ( ) var_name = v1 + " " + v2 else : ( var_name , units ) = ( item , None ) return ( var_name . strip ( ) , units )
If it can match variable name and units from the name it does and returns
(var_name, units).
If it can match variable name and units from the name it does and returns ( var_name units ) .
"""
        If it can match variable name and units from the name it does and returns
        (var_name, units). Otherwise returns (item, None).
        """
self
item