such section. (6) Regulations The Secretary shall prescribe such regulations as may be necessary to carry out the purposes of this subsection, including regulations providing for exceptions from the provisions of this subsection. . (c) Effective date The amendments made by this section shall apply to sales and exchanges on or after November 27, 2017. 13502. Modify definition of substantial built-in loss in the case of transfer of partnership interest (a) In general Paragraph (1) of section 743(d) is to read as follows: (1) In general For purposes of this section, a partnership has a substantial built-in loss with respect to a transfer of an interest in the partnership if— (A) the partnership’s adjusted basis in the partnership property exceeds by more than $250,000 the fair market value of such property, or (B) the transferee partner would be allocated a loss of more than $250,000 if the partnership assets were sold for cash equal to their fair market value immediately after such transfer. . (b) Effective date The amendments made by this section shall apply to transfers of partnership interests after December 31, 2017. 13503. Charitable contributions and foreign taxes taken into account in determining limitation on allowance of partner’s share of loss (a) In general Subsection (d) of section 704 is amended— (1) by striking A partner’s distributive share and inserting the following: (1) In general A partner’s distributive share , (2) by striking Any excess of such loss and inserting the following: (2) Carryover Any excess of such loss , and (3) by adding at the end the following new paragraph: (3) Special rules (A) In general In determining the amount of any loss under paragraph (1), there shall be taken into account the partner’s distributive share of amounts described in paragraphs (4) and (6) of section 702(a). (B) Exception In the case of a charitable contribution of property whose fair market value exceeds its adjusted basis, subparagraph (A) shall not apply to the extent of the partner’s distributive share