Double underscores -- ugly?
benhoyt
benhoyt at gmail.com
Tue Feb 19 21:17:45 EST 2008
> My editor actually renders [underscores] as miniature chess pieces.
> The bartender said she runs a pre-execution step, that searches and
> replaces a double-colon with the underscores.
Heh, that makes me think. Great use for character encodings! Just like
Tim Hatch's "pybraces", we could use any character combo we liked and
just implement a character encoding for it. See:
http://timhatch.com/projects/pybraces/
Just kidding.
Seriously, though, I give in. There's no perfect solution, and it's
probably just a matter of getting over it. Though I wouldn't mind
Raymond Hettinger's suggestion of using single underscores as in
_init_. Only half as ugly. :-)
Then again, what's stopping us just using a single leading underscore?
Nobody calls their own private methods _init or _add ... and that's
only 1/4 the ugliness, which is getting pretty good.
-Ben
More information about the Python-list
mailing list