Section 40. Except as provided in the partnership agreement, a partnership interest is assignable in whole or in part. An assignment of a partnership interest shall not dissolve a limited partnership or entitle the assignee to become or to exercise any rights of a partner. An assignment entitles the assignee to receive, to the extent assigned, only the distribution to which the assignor would be entitled. Except as provided in the partnership agreement, a partner ceases to be a partner upon assignment of all his partnership interest.