[vox-tech] python: slicing extensions from file names

Dave Peticolas vox-tech@lists.lugod.org
29 Jul 2003 17:08:50 -0700


--=-sNc3d+Pjv09AH31NkB78
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2003-07-29 at 16:57, Micah J. Cowan wrote:
<major snippage>
> Actually, most of the time I personally prefer C or C++. But if I want
> a higher-level language that allows me to finish faster in exchange
> for less efficient programs, less direct control over what's
> happening, and the requirement that an implementation be present on
> the end-user's machine, then assuming I knew Python quite as well as I
> know Perl, I would usually use Perl for doing stuff that had any kind
> of major text processing, and Python especially for GUI-oriented
> things.

I don't think Perl is all *that* much better than Python
for text-processing. Python's re module is usually on a
par with Perl's. And the cleaner code of Python is a
major bonus.


> Depends on the text processing, though: I find that
> character-by-character access of a text string is somewhat less
> painful in Python compared to Perl. It always seemed kind of strange
> to me that there wasn't a straightforward C-array-style access to
> strings, or something similar, in Perl.
>=20
> Pet peeve about Python is probably the braindead scoping
> rules. Lexical scopes are not nested: when you enter a block within a
> block, the outer block is completely and utterly obscured.

Yeah, but that was fixed in Python 2.1, released 2 years ago.
Python now uses regular lexical scoping.

dave


--=-sNc3d+Pjv09AH31NkB78
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/JwyS5effKKCmfpIRAohdAJ9z2mWxFkfXFESOMVHFVPp0gyeLPQCfeCtH
XxT+iS1neXx5aWoD3BxoPQI=
=1xVZ
-----END PGP SIGNATURE-----

--=-sNc3d+Pjv09AH31NkB78--