The president says federal courts should not make decisions based on partisan considerations unless it benefits him.