-2

The closing reason for Python's “//” operator wrongly treated as a comment (part 2) , "Python is a webby language", was refuted (by none other than Martijn Pieters, one of the top Python experts at SO).

Statistics confirm this: as of 01.2015, there are more than 400k questions with on SO while only less than 10k of them intersect with , or .

(The queries linked count all other tags that contain those substrings, too. But it's safe to assume such tags typically relate to those languages as well.)

closed as off-topic by Troyen, rene, Shadow The Princess Wizard, ProgramFOX, random Feb 8 '15 at 22:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question pertains only to a specific site in the Stack Exchange Network. Questions on Meta Stack Exchange should pertain to our network or software that drives it as a whole, within the guidelines defined in the help center. You should ask this question on the meta site where your concern originated." – Troyen, rene, Shadow The Princess Wizard, ProgramFOX, random
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Yet questions tagged with Python use Python as the default language these days. Jeff's opinion has long since been overridden. – Martijn Pieters Jan 30 '15 at 13:26
  • 2
    What exactly did you want to achieve with this post? There is nothing to fix here, nor do you actually state a question. – Martijn Pieters Jan 30 '15 at 13:27
  • What do you mean, "there's nothing to fix"? There's still the syntax highlighting error to fix. This all was stated in the question I follow up. – ivan_pozdeev Jan 30 '15 at 13:28
  • If there are errors still with the Python syntax highlighter then that's a bug to be fixed by the Google Prettifier, not Stack Exchange. That's why the other post was duped to the canonical syntax highlighter post. Can you show me a sample post that did not use lang-py automatically even though it should and has // highlighted as a comment? – Martijn Pieters Jan 30 '15 at 13:31
  • Highlighting is working just fine: In Python, what is the difference between '/' and '//' when used for division? – Martijn Pieters Jan 30 '15 at 13:32
  • You mean, issues with an external library used at SE can't be discussed here? Then this should be stated explicitly. Linking to the generic SH post doesn't bring home anything close to such a message. – ivan_pozdeev Jan 30 '15 at 13:34
  • @MartijnPieters ... and is broken here: stackoverflow.com/a/28236021/648265 – ivan_pozdeev Jan 30 '15 at 13:35
  • The FAQ states explicitly that bugs in the parsing are to be filed with the Prettify project. – Martijn Pieters Jan 30 '15 at 13:35
  • That question is tagged C and Python. In such cases no language highlighter is forced and the highlighter uses guessing. Edit the answer to use an explicit <!-- language: lang-py --> comment instead. – Martijn Pieters Jan 30 '15 at 13:36
  • I tried to no effect (at least in the preview) – ivan_pozdeev Jan 30 '15 at 13:38
  • 2
    The preview has a delay; wait a little while after making changes and highlighting is applied. As for the multiple tags issue, see Changes to syntax highlighting: If a question has two tags that both define specific languages, it uses default and lets prettify infer as it always has. – Martijn Pieters Jan 30 '15 at 13:39
  • I've added the comment (using language-all in this case). – Martijn Pieters Jan 30 '15 at 13:40
  • 1
    I know the preview has a delay. The problem turned out to be, the comment was ignored if there was no blank line between it and the preceeding text. I'll file this as a bug instead. – ivan_pozdeev Jan 30 '15 at 13:41
  • No, that is by design, not a bug. That is how Markdown works. – Martijn Pieters Jan 30 '15 at 13:43
  • 2
    Even if it's by design, the highlighting help doesn't mention this when describing the comment. – ivan_pozdeev Jan 30 '15 at 13:45
2

The highlighting bug on Stack Overflow (using the default "guess" highlighting on python questions) has already been fixed; the python tag there defaults to lang-py now.

The problem still occurs if a question includes multiple language tags (like both and tags) in which case, one needs to state the code's language explicitly to correctly highlight constructs that are interpreted differently between those.

Not the answer you're looking for? Browse other questions tagged .