Issue 925500: os.py uses #' - undocumented magic? (original) (raw)

Issue925500

Created on 2004-03-29 18:41 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg20373 - (view) Author: Jim Jewett (jimjjewett) Date: 2004-03-29 18:41
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.
msg20374 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-03-29 22:09
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
msg20375 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-03-31 18:06
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.
History
Date User Action Args
2022-04-11 14:56:03 admin set github: 40098
2004-03-29 18:41:56 jimjjewett create