@@ -151,7 +151,7 @@ can either be a Unicode string, a Latin-1 encoded string or an AST
151151object. Refer to the ast module documentation for information on how
152152to work with AST objects. The filename argument should give the
153153file from which the code was read; pass some recognizable value if it
154- wasn�t read from a file ('<string>' is commonly used). The mode
154+ wasnt read from a file ('<string>' is commonly used). The mode
155155argument specifies what kind of code must be compiled; it can be
156156'exec' if source consists of a sequence of statements, 'eval' if it
157157consists of a single expression, or 'single' if it consists of a
@@ -178,7 +178,7 @@ input must be terminated by at least one newline character. This is to
178178facilitate detection of incomplete and complete statements in the code
179179module. Warning It is possible to crash the Python interpreter
180180with a sufficiently large/complex string when compiling to an AST
181- object due to stack depth limitations in Python�s AST compiler.
181+ object due to stack depth limitations in Pythons AST compiler.
182182Changed in version 2.3: The flags and dont_inherit arguments were
183183added. Changed in version 2.6: Support for compiling AST objects.
184184Changed in version 2.7: Allowed use of Windows and Mac newlines. Also
@@ -205,7 +205,7 @@ delattr(object, name)
205205-template_end
206206-template_doc_string_start
207207 This is a relative of setattr(). The arguments are an object and a
208- string. The string must be the name of one of the object�s attributes.
208+ string. The string must be the name of one of the objects attributes.
209209The function deletes the named attribute, provided the object allows
210210it. For example, delattr(x, 'foobar') is equivalent to del x.foobar.
211211class dict(**kwarg) class dict(mapping, **kwarg) class dict(iterable,
@@ -228,18 +228,18 @@ method will be called and must return the list of attributes. This
228228allows objects that implement a custom __getattr__() or
229229__getattribute__() function to customize the way dir() reports their
230230attributes. If the object does not provide __dir__(), the function
231- tries its best to gather information from the object�s __dict__
231+ tries its best to gather information from the objects __dict__
232232attribute, if defined, and from its type object. The resulting list is
233233not necessarily complete, and may be inaccurate when the object has a
234234custom __getattr__(). The default dir() mechanism behaves
235235differently with different types of objects, as it attempts to produce
236236the most relevant, rather than complete, information: If the
237- object is a module object, the list contains the names of the module�s
237+ object is a module object, the list contains the names of the modules
238238attributes. If the object is a type or class object, the list
239239contains the names of its attributes, and recursively of the
240240attributes of its bases. Otherwise, the list contains the
241- object�s attributes� names, the names of its class�s attributes, and
242- recursively of the attributes of its class�s base classes. The
241+ objects attributes names, the names of its classs attributes, and
242+ recursively of the attributes of its classs base classes. The
243243resulting list is sorted alphabetically. For example: >>> import
244244struct >>> dir() # show the names in the module namespace
245245['__builtins__', '__doc__', '__name__', 'struct'] >>> dir(struct)
@@ -308,7 +308,7 @@ provided, locals can be any mapping object. Changed in version
308308expression argument is parsed and evaluated as a Python expression
309309(technically speaking, a condition list) using the globals and locals
310310dictionaries as global and local namespace. If the globals dictionary
311- is present and lacks � __builtins__� , the current globals are copied
311+ is present and lacks __builtins__, the current globals are copied
312312into globals before expression is parsed. This means that expression
313313normally has full access to the standard __builtin__ module and
314314restricted environments are propagated. If the locals dictionary is
@@ -320,7 +320,7 @@ x = 1 >>> print eval('x+1') 2 This function can also be
320320used to execute arbitrary code objects (such as those created by
321321compile()). In this case pass a code object instead of a string. If
322322the code object has been compiled with 'exec' as the mode argument,
323- eval()� s return value will be None. Hints: dynamic execution of
323+ eval()s return value will be None. Hints: dynamic execution of
324324statements is supported by the exec statement. Execution of statements
325325from a file is supported by the execfile() function. The globals() and
326326locals() functions returns the current global and local dictionary,
@@ -355,7 +355,7 @@ function locals() below: modifications to the default locals
355355dictionary should not be attempted. Pass an explicit locals dictionary
356356if you need to see effects of the code on locals after function
357357execfile() returns. execfile() cannot be used reliably to modify a
358- function�s locals.
358+ functions locals.
359359-template_doc_string_end
360360
361361-template_context 05_built_in_functions.126
@@ -365,9 +365,9 @@ file(name[, mode[, buffering]])
365365-template_end
366366-template_doc_string_start
367367 Constructor function for the file type, described further in
368- section File Objects. The constructor�s arguments are the same as
368+ section File Objects. The constructors arguments are the same as
369369those of the open() built-in function described below. When
370- opening a file, it�s preferable to use open() instead of invoking this
370+ opening a file, its preferable to use open() instead of invoking this
371371constructor directly. file is more suited to type testing (for
372372example, writing isinstance(f, file)). New in version 2.2.
373373-template_doc_string_end
@@ -395,7 +395,7 @@ string, it must contain a possibly signed decimal or floating point
395395number, possibly embedded in whitespace. The argument may also be
396396[+|-]nan or [+|-]inf. Otherwise, the argument may be a plain or long
397397integer or a floating point number, and a floating point number with
398- the same value (within Python�s floating point precision) is returned.
398+ the same value (within Pythons floating point precision) is returned.
399399If no argument is given, returns 0.0. Note When passing in a
400400string, values for NaN and Infinity may be returned, depending on the
401401underlying C library. Float accepts the strings nan, inf and -inf for
@@ -432,7 +432,7 @@ getattr(object, name[, default])
432432-template_end
433433-template_doc_string_start
434434 Return the value of the named attribute of object. name must be a
435- string. If the string is the name of one of the object�s attributes,
435+ string. If the string is the name of one of the objects attributes,
436436the result is the value of that attribute. For example, getattr(x,
437437'foobar') is equivalent to x.foobar. If the named attribute does not
438438exist, default is returned if provided, otherwise AttributeError is
@@ -458,7 +458,7 @@ hasattr(object, name)
458458-template_end
459459-template_doc_string_start
460460 The arguments are an object and a string. The result is True if
461- the string is the name of one of the object�s attributes, False if
461+ the string is the name of one of the objects attributes, False if
462462not. (This is implemented by calling getattr(object, name) and seeing
463463whether it raises an exception or not.)
464464-template_doc_string_end
@@ -620,7 +620,7 @@ len(s)
620620may be a sequence (such as a string, bytes, tuple, list, or range) or
621621a collection (such as a dictionary, set, or frozen set). class
622622list([iterable]) Return a list whose items are the same and in the
623- same order as iterable�s items. iterable may be either a sequence, a
623+ same order as iterables items. iterable may be either a sequence, a
624624container that supports iteration, or an iterator object. If iterable
625625is already a list, a copy is made and returned, similar to
626626iterable[:]. For instance, list('abc') returns ['a', 'b', 'c'] and
@@ -769,9 +769,9 @@ open(name[, mode[, buffering]])
769769-template_doc_string_start
770770 Open a file, returning an object of the file type described in
771771section File Objects. If the file cannot be opened, IOError is raised.
772- When opening a file, it�s preferable to use open() instead of invoking
772+ When opening a file, its preferable to use open() instead of invoking
773773the file constructor directly. The first two arguments are the
774- same as for stdio�s fopen(): name is the file name to be opened, and
774+ same as for stdios fopen(): name is the file name to be opened, and
775775mode is a string indicating how the file is to be opened. The most
776776commonly-used values of mode are 'r' for reading, 'w' for writing
777777(truncating the file if it already exists), and 'a' for appending
@@ -782,9 +782,9 @@ it defaults to 'r'. The default is to use text mode, which may convert
782782back on reading. Thus, when opening a binary file, you should append
783783'b' to the mode value to open the file in binary mode, which will
784784improve portability. (Appending 'b' is useful even on systems that
785- don�t treat binary and text files differently, where it serves as
785+ dont treat binary and text files differently, where it serves as
786786documentation.) See below for more possible values of mode. The
787- optional buffering argument specifies the file�s desired buffer size:
787+ optional buffering argument specifies the files desired buffer size:
7887880 means unbuffered, 1 means line buffered, any other positive value
789789means use a buffer of (approximately) that size (in bytes). A negative
790790buffering means to use the system default, which is usually line
@@ -793,7 +793,7 @@ omitted, the system default is used. 2 Modes 'r+', 'w+' and 'a+'
793793open the file for updating (reading and writing); note that 'w+'
794794truncates the file. Append 'b' to the mode to open the file in binary
795795mode, on systems that differentiate between binary and text files; on
796- systems that don�t have this distinction, adding the 'b' has no
796+ systems that dont have this distinction, adding the 'b' has no
797797effect. In addition to the standard fopen() values mode may be 'U'
798798or 'rU'. Python is usually built with universal newlines support;
799799supplying 'U' opens the file as a text file, but lines may be
@@ -823,7 +823,7 @@ object, or the value of the byte when the argument is an 8-bit string.
823823For example, ord('a') returns the integer 97, ord(u'\u2020') returns
8248248224. This is the inverse of chr() for 8-bit strings and of unichr()
825825for unicode objects. If a unicode argument is given and Python was
826- built with UCS2 Unicode, then the character�s code point must be in
826+ built with UCS2 Unicode, then the characters code point must be in
827827the range [0..65535] inclusive; otherwise the string length is two,
828828and a TypeError will be raised.
829829-template_doc_string_end
@@ -886,7 +886,7 @@ del self._x x = property(getx, setx, delx, "I'm the 'x'
886886property.") If c is an instance of C, c.x will invoke the getter,
887887c.x = value will invoke the setter and del c.x the deleter. If
888888given, doc will be the docstring of the property attribute. Otherwise,
889- the property will copy fget�s docstring (if it exists). This makes it
889+ the property will copy fgets docstring (if it exists). This makes it
890890possible to create read-only properties easily using property() as a
891891decorator: class Parrot(object): def __init__(self):
892892self._voltage = 100000 @property def voltage(self):
@@ -906,7 +906,7 @@ equivalent to the first example. Be sure to give the additional
906906functions the same name as the original property (x in this case.)
907907The returned property object also has the attributes fget, fset, and
908908fdel corresponding to the constructor arguments. New in version
909- 2.2. Changed in version 2.5: Use fget�s docstring if no doc given.
909+ 2.2. Changed in version 2.5: Use fgets docstring if no doc given.
910910Changed in version 2.6: The getter, setter, and deleter attributes
911911were added.
912912-template_doc_string_end
@@ -984,8 +984,8 @@ useful if you have edited the module source file using an external
984984editor and want to try out the new version without leaving the Python
985985interpreter. The return value is the module object (the same as the
986986module argument). When reload(module) is executed: Python
987- modules� code is recompiled and the module-level code reexecuted,
988- defining a new set of objects which are bound to names in the module�s
987+ modules code is recompiled and the module-level code reexecuted,
988+ defining a new set of objects which are bound to names in the modules
989989dictionary. The init function of extension modules is not called a
990990second time. As with all other objects in Python the old
991991objects are only reclaimed after their reference counts drop to zero.
@@ -994,13 +994,13 @@ changed objects. Other references to the old objects (such as
994994names external to the module) are not rebound to refer to the new
995995objects and must be updated in each namespace where they occur if that
996996is desired. There are a number of other caveats: When a module
997- is reloaded, its dictionary (containing the module�s global variables)
997+ is reloaded, its dictionary (containing the modules global variables)
998998is retained. Redefinitions of names will override the old definitions,
999999so this is generally not a problem. If the new version of a module
10001000does not define a name that was defined by the old version, the old
1001- definition remains. This feature can be used to the module�s advantage
1001+ definition remains. This feature can be used to the modules advantage
10021002if it maintains a global table or cache of objects � with a try
1003- statement it can test for the table�s presence and skip its
1003+ statement it can test for the tables presence and skip its
10041004initialization if desired: try: cache except
10051005NameError: cache = {} It is generally not very useful to
10061006reload built-in or dynamically loaded modules. Reloading sys,
@@ -1061,8 +1061,8 @@ closest multiple of 10 to the power minus ndigits; if two multiples
10611061are equally close, rounding is done away from 0 (so, for example,
10621062round(0.5) is 1.0 and round(-0.5) is -1.0). Note The behavior
10631063of round() for floats can be surprising: for example, round(2.675, 2)
1064- gives 2.67 instead of the expected 2.68. This is not a bug: it�s a
1065- result of the fact that most decimal fractions can�t be represented
1064+ gives 2.67 instead of the expected 2.68. This is not a bug: its a
1065+ result of the fact that most decimal fractions cant be represented
10661066exactly as a float. See Floating Point Arithmetic: Issues and
10671067Limitations for more information. class set([iterable]) Return a
10681068new set object, optionally with elements taken from iterable. set is a
@@ -1165,7 +1165,7 @@ sum(iterable[, start])
11651165-template_end
11661166-template_doc_string_start
11671167 Sums start and the items of an iterable from left to right and
1168- returns the total. start defaults to 0. The iterable�s items are
1168+ returns the total. start defaults to 0. The iterables items are
11691169normally numbers, and the start value is not allowed to be a string.
11701170For some use cases, there are good alternatives to sum(). The
11711171preferred, fast way to concatenate a sequence of strings is by calling
@@ -1227,7 +1227,7 @@ tuple([iterable])
12271227-template_end
12281228-template_doc_string_start
12291229 Return a tuple whose items are the same and in the same order as
1230- iterable�s items. iterable may be a sequence, a container that
1230+ iterables items. iterable may be a sequence, a container that
12311231supports iteration, or an iterator object. If iterable is already a
12321232tuple, it is returned unchanged. For instance, tuple('abc') returns
12331233('a', 'b', 'c') and tuple([1, 2, 3]) returns (1, 2, 3). If no argument
@@ -1336,7 +1336,7 @@ the same values as the corresponding list, without actually storing
13361336them all simultaneously. The advantage of xrange() over range() is
13371337minimal (since xrange() still has to create the values when asked for
13381338them) except when a very large range is used on a memory-starved
1339- machine or when all of the range�s elements are never used (such as
1339+ machine or when all of the ranges elements are never used (such as
13401340when the loop is usually terminated with break). For more information
13411341on xrange objects, see XRange Type and Sequence Types � str, unicode,
13421342list, tuple, bytearray, buffer, xrange. CPython implementation
0 commit comments