inspect getsource() minor fix?

Delaney, Timothy (Tim) tdelaney at avaya.com
Mon Sep 19 18:19:30 EDT 2005


Ron Adam wrote:

> While playing around with the inspect module I found that the
> Blockfinder doesn't recognize single line function definitions.
> 
> Adding the following two lines to it fixes it, but I'm not sure if it
> causes any problems anywhere else.
> 
>      elif self.indent == 0:
>          raise EndOfBlock, self.last

Please raise this as a bug report (with the patch) on Sourceforge, or it
almost certainly won't be fixed.

Tim Delaney



More information about the Python-list mailing list