On 9 mar, 20:51, [EMAIL PROTECTED] wrote:

> While you're at it, can you call up prior source, and edit it?  BASIC
> had line numbers:
>
> 10 def f( a ):
> 20   return a+ 1
>
> >>> 15 print( a )

Not so easy. The current CPython implementation assumes that once an
object is allocated, it is never moved to another memory location. If
doing that were allowed, all the object references had to be updated,
or another level of indirection would be required, and neither
alternative looks very promising.
The reload function tries to reuse the module object itself, but its
contents are destroyed and recreated. Maybe for some simple changes
like the above the *same* function object could be re-utilized, but
not in the general case.

--
Gabriel Genellina
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to