(b)(2) shall not apply. . (e) Effective date (1) Net operating loss limitation The amendments made by subsections (a) and (d)(2) shall apply to losses arising in taxable years beginning after December 31, 2017. (2) Carryforwards and carrybacks The amendments made by subsections (b), (c), and (d)(1) shall apply to net operating losses arising in taxable years ending after December 31, 2017. 13303. Like-kind exchanges of real property (a) In general Section 1031(a)(1) is amended by striking property each place it appears and inserting real property . (b) Conforming amendments (1) Paragraph (2) of section 1031(a) is amended to read as follows: (2) Exception for real property held for sale This subsection shall not apply to any exchange of real property held primarily for sale. . (2) Section 1031 is amended by striking subsections (e). (3) Section 1031 , as amended by paragraph (2), is amended by inserting after subsection (d) the following new subsection: (e) Application to certain partnerships For purposes of this section, an interest in a partnership which has in effect a valid election under section 761(a) to be excluded from the application of all of subchapter K shall be treated as an interest in each of the assets of such partnership and not as an interest in a partnership. . (4) Section 1031(h) is amended to read as follows: (h) Special rules for foreign real property Real property located in the United States and real property located outside the United States are not property of a like kind. . (5) Section 1031(i) is amended to read as follows: (i) Special rules for mutual ditch, reservoir, or irrigation company stock For purposes of subsection (a), shares in a mutual ditch, reservoir, or irrigation company shall be treated as real property if at the time of the exchange— (1) the mutual ditch, reservoir, or irrigation company is an organization described in section 501(c)(12)(A) (determined without regard to the percentage of its income that is collected from its members for the purpose of meeting losses