]> git.madduck.net Git - etc/vim.git/blob - tests/data/comments3.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:

e95bd21ca9edaf6af7049c06ff967b54883c92ae
[etc/vim.git] / tests / data / comments3.py
1 def func():
2     x = """
3     a really long string
4     """
5     lcomp3 = [
6         # This one is actually too long to fit in a single line.
7         element.split("\n", 1)[0]
8         # yup
9         for element in collection.select_elements()
10         # right
11         if element is not None
12     ]
13     # Capture each of the exceptions in the MultiError along with each of their causes and contexts
14     if isinstance(exc_value, MultiError):
15         embedded = []
16         for exc in exc_value.exceptions:
17             if exc not in _seen:
18                 embedded.append(
19                     # This should be left alone (before)
20                     traceback.TracebackException.from_exception(
21                         exc,
22                         limit=limit,
23                         lookup_lines=lookup_lines,
24                         capture_locals=capture_locals,
25                         # copy the set of _seen exceptions so that duplicates
26                         # shared between sub-exceptions are not omitted
27                         _seen=set(_seen),
28                     )
29                     # This should be left alone (after)
30                 )
31
32     # everything is fine if the expression isn't nested
33     traceback.TracebackException.from_exception(
34         exc,
35         limit=limit,
36         lookup_lines=lookup_lines,
37         capture_locals=capture_locals,
38         # copy the set of _seen exceptions so that duplicates
39         # shared between sub-exceptions are not omitted
40         _seen=set(_seen),
41     )