##// END OF EJS Templates
Remove python 2 references from docstrings, where appropriate.
Terry Davis -
Show More
@@ -198,8 +198,7 b' def is_simple_callable(obj):'
198 198
199 199 @undoc
200 200 def getargspec(obj):
201 """Wrapper around :func:`inspect.getfullargspec` on Python 3, and
202 :func:inspect.getargspec` on Python 2.
201 """Wrapper around :func:`inspect.getfullargspec`
203 202
204 203 In addition to functions and methods, this can also handle objects with a
205 204 ``__call__`` attribute.
@@ -7,13 +7,7 b' passed. The :func:`reload` function in this module also reloads everything'
7 7 imported from that module, which is useful when you're changing files deep
8 8 inside a package.
9 9
10 To use this as your default reload function, type this for Python 2::
11
12 import __builtin__
13 from IPython.lib import deepreload
14 __builtin__.reload = deepreload.reload
15
16 Or this for Python 3::
10 To use this as your default reload function, type this::
17 11
18 12 import builtins
19 13 from IPython.lib import deepreload
@@ -129,7 +129,7 b' class IPythonPartialTracebackLexer(RegexLexer):'
129 129 """
130 130 Partial lexer for IPython tracebacks.
131 131
132 Handles all the non-python output. This works for both Python 2.x and 3.x.
132 Handles all the non-python output.
133 133
134 134 """
135 135 name = 'IPython Partial Traceback'
@@ -263,18 +263,7 b' class PrettyPrinter(_PrettyPrinterBase):'
263 263
264 264 def begin_group(self, indent=0, open=''):
265 265 """
266 Begin a group. If you want support for python < 2.5 which doesn't has
267 the with statement this is the preferred way:
268
269 p.begin_group(1, '{')
270 ...
271 p.end_group(1, '}')
272
273 The python 2.5 expression would be this:
274
275 with p.group(1, '{', '}'):
276 ...
277
266 Begin a group.
278 267 The first parameter specifies the indentation for the next line (usually
279 268 the width of the opening text), the second the opening text. All
280 269 parameters are optional.
@@ -44,7 +44,7 b' def getdefaultencoding(prefer_stream=True):'
44 44 Then fall back on locale.getpreferredencoding(),
45 45 which should be a sensible platform default (that respects LANG environment),
46 46 and finally to sys.getdefaultencoding() which is the most conservative option,
47 and usually ASCII on Python 2 or UTF8 on Python 3.
47 and usually UTF8 as of Python 3.
48 48 """
49 49 enc = None
50 50 if prefer_stream:
@@ -66,8 +66,7 b' def read_py_file(filename, skip_encoding_cookie=True):'
66 66 The path to the file to read.
67 67 skip_encoding_cookie : bool
68 68 If True (the default), and the encoding declaration is found in the first
69 two lines, that line will be excluded from the output - compiling a
70 unicode string with an encoding declaration is a SyntaxError in Python 2.
69 two lines, that line will be excluded from the output.
71 70
72 71 Returns
73 72 -------
@@ -91,8 +90,7 b" def read_py_url(url, errors='replace', skip_encoding_cookie=True):"
91 90 bytes.decode(), but here 'replace' is the default.
92 91 skip_encoding_cookie : bool
93 92 If True (the default), and the encoding declaration is found in the first
94 two lines, that line will be excluded from the output - compiling a
95 unicode string with an encoding declaration is a SyntaxError in Python 2.
93 two lines, that line will be excluded from the output.
96 94
97 95 Returns
98 96 -------
General Comments 0
You need to be logged in to leave comments. Login now