Refactored mido.portmidi.Port.__init__().