[Python-Dev] PEP 30XZ: Simplified Parsing
Barry Warsaw
barry at python.org
Wed May 2 21:41:38 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 2, 2007, at 3:23 PM, Alexey Borzenkov wrote:
> On 4/30/07, Jim Jewett <jimjjewett at gmail.com> wrote:
>> Python initially inherited its parsing from C. While this has
>> been generally useful, there are some remnants which have been
>> less useful for python, and should be eliminated.
>>
>> + Implicit String concatenation
>>
>> + Line continuation with "\"
>
> I don't know if I can vote, but if I could I'd be -1 on this. Can't
> say I'm using continuation often, but there's one case when I'm using
> it and I'd like to continue using it:
>
> #!/usr/bin/env python
> """\
> Usage: some-tool.py [arguments...]
>
> Does this and that based on its arguments"""
>
> if condition:
> print __doc__
> sys.exit(1)
>
> This way usage immediately stands out much better, without any
> unnecessary new lines.
Me too, all the time.
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRjjpcnEjvBPtnXfVAQL0ngP9FwE7swQSdPiH4wAMQRe1CAzWXBLCXKok
d08GHhyp5GWHs1UzDZbnxnLRVZt+ra/3iSJT8g32X2gX9gWkFUJfqZFN9wLVjzDZ
qlX4m2cJs4nlskRDsycPMY9MLGUwQ8bt7mn92Oh3vXAvtXm42Dxu66NvTlyYdIFQ
9M2HrMbBn1M=
=3kNg
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list