Help: Trying to trim a curve with new domain

Hi guys,
I am trying to trim a curve by altering the domain, but I don’t understand how this works, or if this is the correct approach.

The script runs fine, but the curve isn’t shorter even though the domain is changed.
(I tried both to change the domain and also trim by the domain, but probably in the wrong way)

import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc

TrimDistance = 1

crv_id=rs.GetObject("Curve",rs.filter.curve,preselect=True)
crv = rs.coercecurve(crv_id)
domain = crv.Domain
print crv.Domain

domain[1]-= TrimDistance
crv.Domain = domain
crv.Trim (domain)
print crv.Domain

sc.doc.Objects.AddCurve(crv)

Thanks for any help

Oh, Curve.Trim returns a new curve, not altering self…
So this works:

import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc

TrimDistance = 1

crv_id=rs.GetObject("Curve",rs.filter.curve,preselect=True)
crv = rs.coercecurve(crv_id)
print crv.Domain

domain = crv.Domain
domain[1]-= TrimDistance
crv2 = crv.Trim (domain)
print crv2.Domain

sc.doc.Objects.AddCurve(crv2)