Double underscores -- ugly?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Wed Feb 20 07:09:26 EST 2008


On Wed, 20 Feb 2008 03:12:39 -0800, cokofreedom wrote:

> So people's problem with __word__ is that it is not very readable?
> 
> How so, it stands out on page, it clearly is different from other
> objects and doesn't abuse other symbols that generally have a meaning
> based on their use.
> 
> I haven't seen a single alternative that really stands out as much as
> __word__ does.

My only two gripes about double underscore names are that:

(1) My news reader interprets _X_ as "underline X", which leads to ugly 
display. I could turn that feature off, but that would mean losing *X* 
"bold X", which I like.

(2) Two underscores __ is insufficiently visually different from a single 
underscore _. Choosing a good font reduces the problem, but doesn't make 
it go away.

However, these are minor gripes. On a scale of 0 to -9, where 0 is "it 
doesn't upset me or please me at all" and -9 is "I'd rather die than live 
with this one more minute", these gripes are both about a -2, and far out-
weighed by the advantages. Taking the advantages and the disadvantages 
both into account, I give it a total score of about +4.



-- 
Steven



More information about the Python-list mailing list