[Python-mode] evil underscore as word

Barry Warsaw barry at python.org
Tue Dec 6 16:49:40 CET 2005


On Tue, 2005-12-06 at 18:00 +0900, Stephen J. Turnbull wrote:
> Sorry about the premature send.
> 
> >>>>> "Ben" == Ben Wing <ben at 666.com> writes:
> 
>     Ben> btw is anyone maintaining python-mode?
> 
> Yes.  Skip Montanaro <skip at pobox.com>, as it says in MAINTAINERS.

Others on the python-mode at python.org list also help, as time allows.

>     Ben> despite the following comment:
> [...]
>     Ben> imho it is *not* acceptable to have a random deviation like
>     Ben> this.
> 
> Point taken.  However, imho it's not our place to decide what's
> "acceptable" for externally maintained packages.
> 
> I would like to revisit this issue with the author and/or maintainer,
> but please, let's respect the external maintainer's opinion.

It's been a /long/ time since these issues were hashed out, but I'll try
to give some history as best I can recall.  There was a lot of debate
about this many years ago, and Guido had very strong opinions about how
he wanted it to work.  I think that some of that was based on the way
python-mode historically worked back when it was originally written, in,
oh 1992 or thereabouts.

If you look back in the cvs log, you'll see rev 2.32 1995/10/18 where I
changed underscore to symbol class, and then 2.49 1996/07/03 where I
reverted it back to word class "even though I don't agree with it".
ISTR getting beat up pretty badly about it by users until it was changed
back.  We probably have had no complaints about the current behavior
since then (until now, of course :), so I submit that python-mode users
are pretty happy generally about the current behavior.

IIRC there was some debate about the treatment of underscore w.r.t.
user-facing commands vs. internal functions.  It was brought up that
internal parsing functions might want to treat underscore one way, while
users might want to treat it a different way.  AFAIK, there is still no
'good' way of handling this.  I have a phantom memory that changing the
class of underscore is going to break some parsing or font-locking.

IMO, you can't change the current behavior without doing severe damage
to the muscle memory of existing python-mode users.  If you can provide
a variable that switches underscore's class, while maintaining backward
compatibility with the way it currently works /and/ make sure that
nothing breaks, then I think that might be acceptable.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-mode/attachments/20051206/3626ac39/attachment.pgp


More information about the Python-mode mailing list