Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d741a880
Commit
d741a880
authored
Jun 11, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed indentation of Python examples in C comments.
parent
6250df81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
34 deletions
+34
-34
Modules/itertoolsmodule.c
Modules/itertoolsmodule.c
+11
-11
Objects/descrobject.c
Objects/descrobject.c
+6
-6
Objects/typeobject.c
Objects/typeobject.c
+1
-1
PC/bdist_wininst/install.c
PC/bdist_wininst/install.c
+14
-14
Python/compile.c
Python/compile.c
+2
-2
No files found.
Modules/itertoolsmodule.c
View file @
d741a880
...
...
@@ -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
{
...
...
Objects/descrobject.c
View file @
d741a880
...
...
@@ -1268,11 +1268,11 @@ 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
...
...
@@ -1280,19 +1280,19 @@ PyWrapper_New(PyObject *d, PyObject *self)
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)
*/
...
...
Objects/typeobject.c
View file @
d741a880
...
...
@@ -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
)
...
...
PC/bdist_wininst/install.c
View file @
d741a880
...
...
@@ -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. */
...
...
Python/compile.c
View file @
d741a880
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment