0

How do I reload modules containing functions with annotations in Python? I tried the methods in this thread, but none of them seem to work

@task
def move_to_new_mastery(*args):
    #for all students and subtopics, recalculate mastery
    logger.info('hi')
    return 13

Is there a way to reload modules with functions with annotations or do I need to reload each function individually?

Community
  • 1
  • 1
Casebash
  • 114,675
  • 90
  • 247
  • 350
  • 2
    I think you'll have to be a bit more specific about what exactly you want to achieve. – chthonicdaemon Feb 13 '14 at 08:12
  • functions are first class objects in Python: why reload and not simply redefine? – Stefano M Feb 13 '14 at 08:12
  • `reload` can only reload modules, no single functions, no single classes, only all thet is in the module. Are you sure that you want to reaload a single function? There might be other objects holding a reference to that function. I think it is possible but is this really what you need? – User Feb 13 '14 at 08:56

0 Answers0