How do you implement “#ifdef” in python?
If you just want to disable logging methods, use the logging module. If the log level is set to exclude, say, debug statements, then logging.debug will be very close to a no-op (it just checks the log level and returns without interpolating the log string). If you want to actually remove chunks of code at … Read more