0

Given the code:

def main(args=None):
    if args is None:
        args = sys.argv[1:]
    load_data()

Calling indent-region on the code (under python mode), the output would be:

def main(args=None):
    if args is None:
        args = sys.argv[1:]
        load_data()

load_data is unexpectedly indented.

2
  • What is indent-region supposed to do in a language where indentation is meaningful? – Gilles 'SO- stop being evil' Nov 22 '20 at 13:13
  • At least it shall not do something unexpected. indent-region invokes python-indent-region. It is more about python-indent-region not working, not about indent-region. – FunkyBaby Nov 22 '20 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.