Since the link to the answer in the OP comments is broken, I thought I would post an answer for posterity:
dialog = wx.MessageDialog(self, f'Choose wisely', 'Choice Dialog', wx.YES_NO | wx.CANCEL | wx.CANCEL_DEFAULT | wx.ICON_INFORMATION) # FYI, `ICON_QUESTION` doesn't work on Windows!
dialog.SetYesNoLabels('Label For Yes Button', 'Label For No Button')
answer = dialog.ShowModal()
dialog.Destroy()
# We changed the labels of the buttons on the Yes/No/Cancel dialog, but the IDs generated by pressing those
# buttons are the same as they would be if the button labels were not changed.
if answer == wx.ID_YES:
# Do something for the "Yes" button press
pass
elif answer == wx.ID_NO:
# Do something for the "No" button press
pass
else:
# Do nothing for the "Cancel" button press
return