[Tutor] imported module/global

Andreas Kostyrka andreas at kostyrka.org
Mon Apr 16 20:34:19 CEST 2007


* Luke Paireepinart <rabidpoobear at gmail.com> [070416 20:27]:
> 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?
Notice the space before \t :)

Andreas


More information about the Tutor mailing list