Python design failures (was Re: Let's Talk About Lambda Functions!)

Donn Cave donn at u.washington.edu
Mon Jul 29 13:19:48 EDT 2002


Quoth JB <jb at hotmail.com>:
| Aahz wrote:
|> In article <3d455445_9 at news.newsgroups.com>, JB 
|> <jb at hotmail.com> wrote:
|>|Tim Peters wrote:
|>|>
|>|> two language features are mentioned as being "failed
|>|> experiments" that only compatibility prevents throwing
|>|> away:
|>|> 
|>|>     `back ticks`
|>|>     lambda
|>|
|>| (1) Why are back ticks a failure? I love them.
|> 
|> If you're using backticks frequently, you're probably not
|> programming
|> Pythonically.  There's already repr() to produce the same
|> result as backticks, and backticks have the problem that
|> in many fonts they're nearly indistinguishable from single
|> quotes.
|
| I do not understand this. I use __repr__ *and* backticks. 
| For example
|
| class AnyClass:
|   defr __repr__(self):
|     ...
|
| a = AnyClass()
| myfile.write(`a`)
|
| I use this construction rather frequently. What is wrong 
| with it?

What he said - "... nearly indistinguishable from single quotes."
Density at the expense of legibility is why I'd say it doesn't really
fit with my ideal of Python programming style.

On the other hand, list comprehensions certainly would fall in that
category too, and there's no question that I'm out of touch with the
prevailing sentiment on comp.lang.python about things like this.
And the distribution library appears to use `` rather liberally -
probably more than repr().  Obviously this doesn't make it any
better (is Perl more wonderful for all the people who use it, or
Visual Basic, C++, etc?)  But we can't pretend there's a consensus.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list