Skip to content

Commit

Permalink
Fixed indentation of Python examples in C comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Jun 10, 2015
1 parent 6250df8 commit d741a88
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
22 changes: 11 additions & 11 deletions Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2985,18 +2985,18 @@ def permutations(iterable, r=None):
cycles = range(n-r+1, n+1)[::-1]
yield tuple(pool[i] for i in indices[:r])
while n:
for i in reversed(range(r)):
cycles[i] -= 1
if cycles[i] == 0:
indices[i:] = indices[i+1:] + indices[i:i+1]
cycles[i] = n - i
for i in reversed(range(r)):
cycles[i] -= 1
if cycles[i] == 0:
indices[i:] = indices[i+1:] + indices[i:i+1]
cycles[i] = n - i
else:
j = cycles[i]
indices[i], indices[-j] = indices[-j], indices[i]
yield tuple(pool[i] for i in indices[:r])
break
else:
j = cycles[i]
indices[i], indices[-j] = indices[-j], indices[i]
yield tuple(pool[i] for i in indices[:r])
break
else:
return
return
*/

typedef struct {
Expand Down
12 changes: 6 additions & 6 deletions Objects/descrobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,31 +1268,31 @@ PyWrapper_New(PyObject *d, PyObject *self)
/* A built-in 'property' type */

/*
class property(object):
class property(object):
def __init__(self, fget=None, fset=None, fdel=None, doc=None):
if doc is None and fget is not None and hasattr(fget, "__doc__"):
doc = fget.__doc__
doc = fget.__doc__
self.__get = fget
self.__set = fset
self.__del = fdel
self.__doc__ = doc
def __get__(self, inst, type=None):
if inst is None:
return self
return self
if self.__get is None:
raise AttributeError, "unreadable attribute"
raise AttributeError, "unreadable attribute"
return self.__get(inst)
def __set__(self, inst, value):
if self.__set is None:
raise AttributeError, "can't set attribute"
raise AttributeError, "can't set attribute"
return self.__set(inst, value)
def __delete__(self, inst):
if self.__del is None:
raise AttributeError, "can't delete attribute"
raise AttributeError, "can't delete attribute"
return self.__del(inst)
*/
Expand Down
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -4219,7 +4219,7 @@ PyDoc_STRVAR(object_subclasshook_doc,
class object:
def __format__(self, format_spec):
return format(str(self), format_spec)
return format(str(self), format_spec)
*/
static PyObject *
object_format(PyObject *self, PyObject *args)
Expand Down
28 changes: 14 additions & 14 deletions PC/bdist_wininst/install.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,21 +1941,21 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
/*
* The scheme we have to use depends on the Python version...
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
'platlib': '$base',
'headers': '$base/Include/$dist_name',
'scripts': '$base/Scripts',
'data' : '$base',
}
WINDOWS_SCHEME = {
'purelib': '$base',
'platlib': '$base',
'headers': '$base/Include/$dist_name',
'scripts': '$base/Scripts',
'data' : '$base',
}
else:
WINDOWS_SCHEME = {
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
'headers': '$base/Include/$dist_name',
'scripts': '$base/Scripts',
'data' : '$base',
}
WINDOWS_SCHEME = {
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
'headers': '$base/Include/$dist_name',
'scripts': '$base/Scripts',
'data' : '$base',
}
*/
scheme = GetScheme(py_major, py_minor);
/* Run the pre-install script. */
Expand Down
4 changes: 2 additions & 2 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -3330,9 +3330,9 @@ expr_constant(struct compiler *c, expr_ty e)
BLOCK
finally:
if an exception was raised:
exc = copy of (exception, instance, traceback)
exc = copy of (exception, instance, traceback)
else:
exc = (None, None, None)
exc = (None, None, None)
exit(*exc)
*/
static int
Expand Down

0 comments on commit d741a88

Please sign in to comment.