[Tutor] imported module/global

Luke Paireepinart rabidpoobear at gmail.com
Mon Apr 16 17:45:35 CEST 2007


Andreas Kostyrka wrote:
> OTOH, module globals are seldom used, and usually frowned on. E.g. the
> python2.5 standard lib (>200K lines, 584 py files), uses exactly 104
> distinct global statements.
>
> andreas at andi-lap:/usr/lib/python2.5> grep -r "^[ \t]*global " . | sed 's/[ \t][ \t]*/ /' | sort -u | wc -l
>   
I don't understand this grep exactly, but it looks to me like it only 
counts globals after tabs...
what about globals after spaces?


More information about the Tutor mailing list