def addSegment(feature, start, end, template, options):
    if start >= end:
        return 0

    entry = GTF.Entry()

    if isinstance(template, tuple):
        entry.copy(template[0])
        entry.clearAttributes()
        entry.addAttribute("downstream_gene_id", template[1].gene_id)
    else:
        entry.copy(template)
        entry.clearAttributes()

    entry.start, entry.end = start, end
    entry.feature = feature
    if feature not in ("exon", "CDS", "UTR", "UTR3", "UTR5"):
        entry.score = "."
    options.stdout.write(str(entry) + "\n")

    return 1
Setter overidden to prevent assignment to fields after creation.
dataset/ETHPy150Open CGATOxford/cgat/scripts/gtf2gff.py/addSegment--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/messages.py/Field.__setattr__