[ python-Bugs-925500 ] os.py uses #' - undocumented magic?

SourceForge.net noreply at sourceforge.net
Wed Mar 31 13:06:09 EST 2004


Bugs item #925500, was opened at 2004-03-29 12:41
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=925500&group_id=5470

Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 3
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Skip Montanaro (montanaro)
Summary: os.py uses #' - undocumented magic?

Initial Comment:
os.py wraps the first section of code (determining which 
operating system and path to use) in lines containing just 

#'

(A comment start followed by a single-quote start.)

This looks like unexplained magic.  It should either be 
deleted, or commented to indicate why it is there.



----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2004-03-31 12:06

Message:
Logged In: YES 
user_id=44345

It's not magic.  It's just there to get python-mode back in
sync.  Emacs's notion of string characters doesn't include
triple-quoted strings, so if you have something like:

    """Madam, I'm Adam."""

it can look unbalanced to python-mode (lone apostrophe). 
The #' simply "closes" that apostrophe.

I don't think it warrants a comment everywhere it's used. 
It's just something people need to understand.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-03-29 16:09

Message:
Logged In: YES 
user_id=21627

Assigning to Skip, who added these in os.py 1.41, with a
check-in message of

added several more __all__ lists


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=925500&group_id=5470



More information about the Python-bugs-list mailing list