Re: Deprecating reload() ???
[color=blue][color=green]
>> I wrote something and threw it up on my Python Bits page:
>>
>> http://www.musi-cal.com/~skip/python/[/color][/color]
Dave> I get AttributeErrors when I try the super_reload function. Looks
Dave> like sys.modules has a bunch of items with no '__dict__'.
You can put objects in sys.modules which are not module objects. I updated
the code to use getattr() and setattr() during the rebinding step. I think
that will help, though of course this entire exercise is obviously only an
approximation to a solution.
Skip
[color=blue][color=green]
>> I wrote something and threw it up on my Python Bits page:
>>
>> http://www.musi-cal.com/~skip/python/[/color][/color]
Dave> I get AttributeErrors when I try the super_reload function. Looks
Dave> like sys.modules has a bunch of items with no '__dict__'.
You can put objects in sys.modules which are not module objects. I updated
the code to use getattr() and setattr() during the rebinding step. I think
that will help, though of course this entire exercise is obviously only an
approximation to a solution.
Skip
Comment