line number var like perl's $.?

Kirk Strauser kirk at strauser.com
Mon Nov 17 18:55:05 CET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2003-11-17T15:51:52Z, Matthew Wilson <mwilson at sarcastic-horse.com> writes:

> Tracking line numbers is such a common thing to do when parsing files that
> it makes sense for there to be a builtin for it.

OTOH, I don't know that I've ever needed to track line numbers, other than
to do something like 'print "Lines:", linenum' after reading a bunch of
stuff from stdin.

I only mention this to illustrate that what's common to you is not
necessarily common to others.  Your essential feature is another's cruft.
- -- 
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/uQqh5sRg+Y0CpvERAm6XAJwOsjML/se7yf6PGeNmHEqc8PvnmACcCllx
rkneNtVmVNKNiW3QPQ0i21Y=
=oaZV
-----END PGP SIGNATURE-----




More information about the Python-list mailing list