how to count lines in a file ?

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Sat Jul 27 20:54:18 EDT 2002


bokr at oz.net (Bengt Richter) writes:
> write a handler for. A rack of event handlers might be specified
> much like __slots__, except a list of tuples instead of names,
> (could use a dict, but might want to specify piority order to
> put likely events first) e.g., (using a fictional container for
> standard platform event, perhaps extendable a la sys.modules):

Oh please no.  Python has too many magic variables already (__slots__,
__all__, and so forth).  These are used to do things that would
normally be done by adding statements to the language, e.g. __all__ is
what would normally be an export statement and __slots__ is what would
normally be variable declarations.  Somehow it's considered
unminimalistic to add statements to the language to do these necessary
things, so clumsy magic variables get added instaed.




More information about the Python-list mailing list