Special rules
(A) In the case of any sale of real property, if— (i) a taxpayer may not, by reason of his method of accounting, deduct any amount for taxes unless paid, and (ii) the other party to the sale is (under the law imposing the real property tax) liable for the real property tax for the real property tax year, then for purposes of subsection (a) the taxpayer shall be treated as having paid, on the date of the sale, so much of such tax as, under paragraph (1) of this subsection, is treated as imposed on the taxpayer. For purposes of the preceding sentence, if neither party is liable for the tax, then the party holding the property at the time the tax becomes a lien on the property shall be considered liable for the real property tax for the real property tax year.
(B) In the case of any sale of real property, if the taxpayer’s taxable income for the taxable year during which the sale occurs is computed under an accrual method of accounting, and if no election under section 461(c) (relating to the accrual of real property taxes) applies, then, for purposes of subsection (a), that portion of such tax which— (i) is treated, under paragraph (1) of this subsection, as imposed on the taxpayer, and (ii) may not, by reason of the taxpayer’s method of accounting, be deducted by the taxpayer for any taxable year, shall be treated as having accrued on the date of the sale.