Hello,
Please consider adding a PUD_UNSET option alongside PUD_OFF, PUD_DOWN and PUD_UP for the pull_up_down parameter to setup().
I am using the GPIO pins in multiple processes simultaneously. Because of that, I configure the pull up/down resistors for the GPIO pins in a separate process from all of the processes that read input from that GPIO pin. Please consider the PUD_UNSET option to allow a process to initialize the RPi.GPIO library and configure a pin for input without changing its externally set pull_up_down configuration.
The attached patch file implements this, and it "Works On My Machine." This patch does NOT have the Raspberry Pi 4 change to set_pullupdn in it, let me know if you need me to merge it over the latest source that includes that change.
Thank you.