XML 18 R1.htm IDEA: XBRL DOCUMENT v3.23.2
N-2
6 Months Ended
Apr. 30, 2023
Cover [Abstract]  
Entity Central Index Key 0000065433
Amendment Flag false
Entity Inv Company Type N-2
Document Type N-CSRS
Entity Registrant Name THE MEXICO FUND, INC.