Python's annoyance.
Steven Bethard
steven.bethard at gmail.com
Wed Nov 24 14:44:52 EST 2004
Jp Calderone wrote:
> On Wed, 24 Nov 2004 19:03:26 GMT, Steven Bethard <steven.bethard at gmail.com> wrote:
>
>>While I'm not a fan of the decorator syntax or the $syntax in
>>string.Template, you're not forced to use either of these:
>
> You may not be forced to write them
[snip]
> it is likely that you will be forced to *read* them.
[snip]
> the argument "If you don't like that feature, don't use it" is
> relatively meritless.
Well, it's certainly true that reading code is often a more important
concern, but I'm not sure I agree that the issue's as black and white as
you seem to want to draw it. If 90% of people don't use the features,
then I only have to read them 10% of the time. So the more people I
convince not to use the feature, the less code that gets written with
the feature, and the easier my reading gets. ;)
Of course, I still have to be able to read both syntactic variants, but
I don't have to read them *all the time*. If I have to look up an
unfamiliar variant occasionally, I don't see this as any worse than
having to look up a library module's functions occasionally[1].
Steve
[1] Since string.Template *is* a library module, I don't see looking up
what the $-syntax means as being any worse than, say, reading the re
module docs again (which I have to do pretty much every time I decide to
use regexps).
More information about the Python-list
mailing list