8000 Issue #17516: use comment syntax for comments, instead of multiline s… · python/cpython@765531d · GitHub
[go: up one dir, main page]

Skip to content

Commit 765531d

Browse files
committed
Issue #17516: use comment syntax for comments, instead of multiline string
1 parent 1f8898a commit 765531d

File tree

11 files changed

+494
-508
lines changed

11 files changed

+494
-508
lines changed

Lib/ctypes/__init__.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@
3434
FUNCFLAG_USE_ERRNO as _FUNCFLAG_USE_ERRNO, \
3535
FUNCFLAG_USE_LASTERROR as _FUNCFLAG_USE_LASTERROR
3636

37-
"""
38-
WINOLEAPI -> HRESULT
39-
WINOLEAPI_(type)
40-
41-
STDMETHODCALLTYPE
42-
43-
STDMETHOD(name)
44-
STDMETHOD_(type, name)
45-
46-
STDAPICALLTYPE
47-
"""
37+
# WINOLEAPI -> HRESULT
38+
# WINOLEAPI_(type)
39+
#
40+
# STDMETHODCALLTYPE
41+
#
42+
# STDMETHOD(name)
43+
# STDMETHOD_(type, name)
44+
#
45+
# STDAPICALLTYPE
4846

4947
def create_string_buffer(init, size=None):
5048
"""create_string_buffer(aBytes) -> character array

Lib/ctypes/test/test_internals.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@
55

66
# XXX This test must be reviewed for correctness!!!
77

8-
"""
9-
ctypes' types are container types.
10-
11-
They have an internal memory block, which only consists of some bytes,
12-
but it has to keep references to other objects as well. This is not
13-
really needed for trivial C types like int or char, but it is important
14-
for aggregate types like strings or pointers in particular.
15-
16-
What about pointers?
17-
18-
"""
8+
# ctypes' types are container types.
9+
#
10+
# They have an internal memory block, which only consists of some bytes,
11+
# but it has to keep references to other objects as well. This is not
12+
# really needed for trivial C types like int or char, but it is important
13+
# for aggregate types like strings or pointers in particular.
14+
#
15+
# What about pointers?
1916

2017
class ObjectsTestCase(unittest.TestCase):
2118
def assertSame(self, a, b):

Lib/ctypes/test/test_macholib.py

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,33 @@
33
import unittest
44

55
# Bob Ippolito:
6-
"""
7-
Ok.. the code to find the filename for __getattr__ should look
8-
something like:
9-
10-
import os
11-
from macholib.dyld import dyld_find
12-
13-
def find_lib(name):
14-
possible = ['lib'+name+'.dylib', name+'.dylib',
15-
name+'.framework/'+name]
16-
for dylib in possible:
17-
try:
18-
return os.path.realpath(dyld_find(dylib))
19-
except ValueError:
20-
pass
21-
raise ValueError, "%s not found" % (name,)
22-
23-
It'll have output like this:
24-
25-
>>> find_lib('pthread')
26-
'/usr/lib/libSystem.B.dylib'
27-
>>> find_lib('z')
28-
'/usr/lib/libz.1.dylib'
29-
>>> find_lib('IOKit')
30-
'/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit'
31-
32-
-bob
33-
34-
"""
6+
#
7+
# Ok.. the code to find the filename for __getattr__ should look
8+
# something like:
9+
#
10+
# import os
11+
# from macholib.dyld import dyld_find
12+
#
13+
# def find_lib(name):
14+
# possible = ['lib'+name+'.dylib', name+'.dylib',
15+
# name+'.framework/'+name]
16+
# for dylib in possible:
17+
# try:
18+
# return os.path.realpath(dyld_find(dylib))
19+
# except ValueError:
20+
# pass
21+
# raise ValueError, "%s not found" % (name,)
22+
#
23+
# It'll have output like this:
24+
#
25+
# >>> find_lib('pthread')
26+
# '/usr/lib/libSystem.B.dylib'
27+
# >>> find_lib('z')
28+
# '/usr/lib/libz.1.dylib'
29+
# >>> find_lib('IOKit')
30+
# '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit'
31+
#
32+
# -bob
3533

3634
from ctypes.macholib.dyld import dyld_find
3735

0 commit comments

Comments
 (0)
0