]> git.madduck.net Git - etc/vim.git/blob - tests/comments5.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

703922ddb75537192428b969d5018f0f9127072d
[etc/vim.git] / tests / comments5.py
1 while True:
2     if something.changed:
3         do.stuff()  # trailing comment
4         # Comment belongs to the `if` block.
5     # This one belongs to the `while` block.
6
7     # Should this one, too?  I guess so.
8
9 # This one is properly standalone now.
10
11 for i in range(100):
12     # first we do this
13     if i % 33 == 0:
14         break
15
16     # then we do this
17     print(i)
18     # and finally we loop around
19
20 with open(some_temp_file) as f:
21     data = f.read()
22
23 try:
24     with open(some_other_file) as w:
25         w.write(data)
26
27 except OSError:
28     print("problems")
29
30 if __name__ == "__main__":
31     main()