Python: improve in elegant way (code saving) a function in order to avoid several statements
A possible dictionary based solution:

import os.path

import shapefile
from liblas import file as lasfile


# map fields representing characters to field name and attribute
FIELDS = {
    'i': ('Intensity', 'intensity'),
    'r': ('Return', 'return_number'),
    'n': ('NumberRet', 'number_of_returns'),
    's': ('ScanDir', 'scan_direction'),
    'e': ('FlightEdge', 'flightline_edge'),
    'c': ('Class', 'classification'),
    'a': ('ScanAngle', 'scan_angle'),
}

# assuming that field order is important define it explicitly, otherwise it
# could simply be DEFAULT_PARSE = FIELDS.keys()
DEFAULT_PARSE = 'irnseca'


def enhanced_LAS2SHP(inFile, outFile=None, parse=DEFAULT_PARSE):
    w = shapefile.Writer(shapefile.POINT)
    # add 'Z' field not present in fields map
    w.field('Z', 'C', '10')
    # initialise list of desired record attributes
    attributes = []
    # add mapped 'shapefile' fields and desired attributes to list
    for f in parse:
        field, attr = FIELDS[f]
        w.field(field_name, 'C', '10')
        attributes.append(attr)
    # create record from attributes in list of desired attributes
    for p in lasfile.File(inFile, None, 'r'):
        w.point(p.x, p.y)
        record_args = [float(p.z)]
        record_args += (float(getattr(p, attr)) for attr in attributes)
        w.record(*record_args)
    # if not output filename was supplied derive one from input filename
    if outFile is None:
        inFile_path, inFile_name_ext = os.path.split(os.path.abspath(inFile))
        inFile_name, _ = os.path.splitext(inFile_name_ext)
        outFile = os.path.join(inFile_path, '{}.shp'.format(inFile_name))
    # save records to 'shapefile'
    w.save(outFile)