[PYTHON] Escape __init__.py

init.py …… That? Is init bold? Where did Ansco go?

Yes, in Markdown, if you enclose it in __, it will be bold. It kills Pythonista. Then what to do ...

  1. Treat as code


So, the idea of enclosing it in backticks and treating it as a code. The result is __init__.py. This is a lot of work, and the code is highly readable, so I'm wondering if this is all right.

The downside is that it looks like "copy __init__.py and app.py", which is visually inconsistent with other .pys. If you don't mind this, this is it.

  1. Escape


Escape with backslash (yen mark). The result is \ _ \ _ init \ _ \ _. Py. It looks the same as a normal sentence.

The downside is that it's hard to write code and hard to see.

By the way, I happened to notice it in __init__.py, so I wrote this, but the same problem occurs with __str__ and __repr__. But this is a code, so backticks are an option.

Recommended Posts

Escape __init__.py
Escape sequence