mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Merged revisions 69846 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines Issue #5341: Fix a variety of spelling errors. ........
This commit is contained in:
@@ -110,12 +110,12 @@ def makeCascadeMenu():
|
||||
Cascade_button.menu.choices = Menu(Cascade_button.menu)
|
||||
|
||||
# ...and this is a menu that cascades from that.
|
||||
Cascade_button.menu.choices.wierdones = Menu(Cascade_button.menu.choices)
|
||||
Cascade_button.menu.choices.weirdones = Menu(Cascade_button.menu.choices)
|
||||
|
||||
# then you define the menus from the deepest level on up.
|
||||
Cascade_button.menu.choices.wierdones.add_command(label='avacado')
|
||||
Cascade_button.menu.choices.wierdones.add_command(label='belgian endive')
|
||||
Cascade_button.menu.choices.wierdones.add_command(label='beefaroni')
|
||||
Cascade_button.menu.choices.weirdones.add_command(label='avacado')
|
||||
Cascade_button.menu.choices.weirdones.add_command(label='belgian endive')
|
||||
Cascade_button.menu.choices.weirdones.add_command(label='beefaroni')
|
||||
|
||||
# definition of the menu one level up...
|
||||
Cascade_button.menu.choices.add_command(label='Chocolate')
|
||||
@@ -125,8 +125,8 @@ def makeCascadeMenu():
|
||||
Cascade_button.menu.choices.add_command(label='Rocky Road')
|
||||
Cascade_button.menu.choices.add_command(label='BubbleGum')
|
||||
Cascade_button.menu.choices.add_cascade(
|
||||
label='Wierd Flavors',
|
||||
menu=Cascade_button.menu.choices.wierdones)
|
||||
label='Weird Flavors',
|
||||
menu=Cascade_button.menu.choices.weirdones)
|
||||
|
||||
# and finally, the definition for the top level
|
||||
Cascade_button.menu.add_cascade(label='more choices',
|
||||
|
||||
@@ -48,7 +48,7 @@ def makeFileMenu():
|
||||
File_button.menu = Menu(File_button)
|
||||
|
||||
# add an item. The first param is a menu entry type,
|
||||
# must be one of: "cascade", "checkbutton", "command", "radiobutton", "seperator"
|
||||
# must be one of: "cascade", "checkbutton", "command", "radiobutton", "separator"
|
||||
# see menu-demo-2.py for examples of use
|
||||
File_button.menu.add_command(label='New...', underline=0,
|
||||
command=new_file)
|
||||
|
||||
@@ -426,7 +426,7 @@ MVC stands for three components:
|
||||
user. Typically this component is represented by the templates.
|
||||
* The *controller*. This is the layer between the user and the model. The
|
||||
controller reacts on user actions (like opening some specific URL) and tells
|
||||
the model to modify the data if neccessary.
|
||||
the model to modify the data if necessary.
|
||||
|
||||
While one might think that MVC is a complex design pattern, in fact it is not.
|
||||
It is used in Python because it has turned out to be useful for creating clean,
|
||||
@@ -435,9 +435,9 @@ maintainable web sites.
|
||||
.. note::
|
||||
|
||||
While not all Python frameworks explicitly support MVC, it is often trivial
|
||||
to create a web site which uses the MVC pattern by seperating the data logic
|
||||
to create a web site which uses the MVC pattern by separating the data logic
|
||||
(the model) from the user interaction logic (the controller) and the
|
||||
templates (the view). That's why it is important not to write unneccessary
|
||||
templates (the view). That's why it is important not to write unnecessary
|
||||
Python code in the templates -- it is against MVC and creates more chaos.
|
||||
|
||||
.. seealso::
|
||||
@@ -607,7 +607,7 @@ Some notable frameworks
|
||||
-----------------------
|
||||
|
||||
There is an incredible number of frameworks, so there is no way to describe them
|
||||
all. It is not even neccessary, as most of these frameworks are nothing special
|
||||
all. It is not even necessary, as most of these frameworks are nothing special
|
||||
and everything that can be done with these can also be done with one of the
|
||||
popular ones.
|
||||
|
||||
@@ -679,7 +679,7 @@ project called `Grok <http://grok.zope.org/>`_ which makes it possible for
|
||||
Another framework that's already been mentioned is `Pylons`_. Pylons is much
|
||||
like TurboGears with ab even stronger emphasis on flexibility, which is bought
|
||||
at the cost of being more difficult to use. Nearly every component can be
|
||||
exchanged, which makes it neccessary to use the documentation of every single
|
||||
exchanged, which makes it necessary to use the documentation of every single
|
||||
component, because there are so many Pylons combinations possible that can
|
||||
satisfy every requirement. Pylons builds upon `Paste
|
||||
<http://pythonpaste.org/>`_, an extensive set of tools which are handy for WSGI.
|
||||
|
||||
@@ -13,7 +13,7 @@ builtin :func:`open` function is defined in this module.
|
||||
|
||||
At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It
|
||||
defines the basic interface to a stream. Note, however, that there is no
|
||||
seperation between reading and writing to streams; implementations are allowed
|
||||
separation between reading and writing to streams; implementations are allowed
|
||||
to throw an :exc:`IOError` if they do not support a given operation.
|
||||
|
||||
Extending :class:`IOBase` is :class:`RawIOBase` which deals simply with the
|
||||
@@ -611,7 +611,7 @@ Text I/O
|
||||
is enabled. With this enabled, on input, the lines endings ``'\n'``,
|
||||
``'\r'``, or ``'\r\n'`` are translated to ``'\n'`` before being returned to
|
||||
the caller. Conversely, on output, ``'\n'`` is translated to the system
|
||||
default line seperator, :data:`os.linesep`. If *newline* is any other of its
|
||||
default line separator, :data:`os.linesep`. If *newline* is any other of its
|
||||
legal values, that newline becomes the newline when the file is read and it
|
||||
is returned untranslated. On output, ``'\n'`` is converted to the *newline*.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal
|
||||
concept: starting another process and being able to write to and read from its
|
||||
controlling terminal programmatically.
|
||||
|
||||
Because pseudo-terminal handling is highly platform dependant, there is code to
|
||||
Because pseudo-terminal handling is highly platform dependent, there is code to
|
||||
do it only for SGI and Linux. (The Linux code is supposed to work on other
|
||||
platforms, but hasn't been tested yet.)
|
||||
|
||||
|
||||
@@ -174,9 +174,9 @@ This module also defines four shortcut functions:
|
||||
To capture standard error in the result, use stderr=subprocess.STDOUT.
|
||||
|
||||
>>> subprocess.check_output(
|
||||
["/bin/sh", "-c", "ls non_existant_file ; exit 0"],
|
||||
["/bin/sh", "-c", "ls non_existent_file ; exit 0"],
|
||||
stderr=subprocess.STDOUT)
|
||||
'ls: non_existant_file: No such file or directory\n'
|
||||
'ls: non_existent_file: No such file or directory\n'
|
||||
|
||||
.. versionadded:: 3.1
|
||||
|
||||
|
||||
@@ -522,7 +522,7 @@ arguments)``. This is occasionally useful to clients as well. (Note that this
|
||||
only works if the base class is defined or imported directly in the global
|
||||
scope.)
|
||||
|
||||
Python has two builtin functions that work with inheritance:
|
||||
Python has two built-in functions that work with inheritance:
|
||||
|
||||
* Use :func:`isinstance` to check an object's type: ``isinstance(obj, int)``
|
||||
will be ``True`` only if ``obj.__class__`` is :class:`int` or some class
|
||||
|
||||
@@ -254,7 +254,7 @@ A more verbose version of this snippet shows the flow explicitly::
|
||||
print(row[i], end="")
|
||||
print()
|
||||
|
||||
In real world, you should prefer builtin functions to complex flow statements.
|
||||
In real world, you should prefer built-in functions to complex flow statements.
|
||||
The :func:`zip` function would do a great job for this use case::
|
||||
|
||||
>>> list(zip(*mat))
|
||||
|
||||
@@ -65,7 +65,7 @@ display ::
|
||||
>>> 0.1
|
||||
0.1000000000000000055511151231257827021181583404541015625
|
||||
|
||||
instead! The Python prompt uses the builtin :func:`repr` function to obtain a
|
||||
instead! The Python prompt uses the built-in :func:`repr` function to obtain a
|
||||
string version of everything it displays. For floats, ``repr(float)`` rounds
|
||||
the true decimal value to 17 significant digits, giving ::
|
||||
|
||||
@@ -81,7 +81,7 @@ thing in all languages that support your hardware's floating-point arithmetic
|
||||
(although some languages may not *display* the difference by default, or in all
|
||||
output modes).
|
||||
|
||||
Python's builtin :func:`str` function produces only 12 significant digits, and
|
||||
Python's built-in :func:`str` function produces only 12 significant digits, and
|
||||
you may wish to use that instead. It's unusual for ``eval(str(x))`` to
|
||||
reproduce *x*, but the output may be more pleasant to look at::
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ notation.::
|
||||
This is particularly useful in combination with the new built-in :func:`vars`
|
||||
function, which returns a dictionary containing all local variables.
|
||||
|
||||
For a complete overview of string formating with :meth:`str.format`, see
|
||||
For a complete overview of string formatting with :meth:`str.format`, see
|
||||
:ref:`formatstrings`.
|
||||
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ operating system::
|
||||
>>> os.chdir('/server/accesslogs')
|
||||
|
||||
Be sure to use the ``import os`` style instead of ``from os import *``. This
|
||||
will keep :func:`os.open` from shadowing the builtin :func:`open` function which
|
||||
will keep :func:`os.open` from shadowing the built-in :func:`open` function which
|
||||
operates much differently.
|
||||
|
||||
.. index:: builtin: help
|
||||
|
||||
The builtin :func:`dir` and :func:`help` functions are useful as interactive
|
||||
The built-in :func:`dir` and :func:`help` functions are useful as interactive
|
||||
aids for working with large modules like :mod:`os`::
|
||||
|
||||
>>> import os
|
||||
|
||||
@@ -1329,7 +1329,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
|
||||
(from line tuple, to line tuple, boolean flag)
|
||||
|
||||
from/to line tuple -- (line num, line text)
|
||||
line num -- integer or None (to indicate a context seperation)
|
||||
line num -- integer or None (to indicate a context separation)
|
||||
line text -- original line text with following markers inserted:
|
||||
'\0+' -- marks start of added text
|
||||
'\0-' -- marks start of deleted text
|
||||
|
||||
@@ -57,7 +57,7 @@ class CoreTestCase(unittest.TestCase):
|
||||
|
||||
def test_run_setup_uses_current_dir(self):
|
||||
# This tests that the setup script is run with the current directory
|
||||
# as it's own current directory; this was temporarily broken by a
|
||||
# as its own current directory; this was temporarily broken by a
|
||||
# previous patch when TESTFN did not use the current directory.
|
||||
sys.stdout = io.StringIO()
|
||||
cwd = os.getcwd()
|
||||
|
||||
@@ -21,7 +21,7 @@ from email.charset import Charset
|
||||
SEMISPACE = '; '
|
||||
|
||||
# Regular expression that matches `special' characters in parameters, the
|
||||
# existance of which force quoting of the parameter value.
|
||||
# existence of which force quoting of the parameter value.
|
||||
tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class AutoComplete:
|
||||
|
||||
def try_open_completions_event(self, event):
|
||||
"""Happens when it would be nice to open a completion list, but not
|
||||
really neccesary, for example after an dot, so function
|
||||
really necessary, for example after an dot, so function
|
||||
calls won't be made.
|
||||
"""
|
||||
lastchar = self.text.get("insert-1c")
|
||||
@@ -79,7 +79,7 @@ class AutoComplete:
|
||||
COMPLETE_FILES)
|
||||
|
||||
def autocomplete_event(self, event):
|
||||
"""Happens when the user wants to complete his word, and if neccesary,
|
||||
"""Happens when the user wants to complete his word, and if necessary,
|
||||
open a completion list after that (if there is more than one
|
||||
completion)
|
||||
"""
|
||||
|
||||
@@ -339,7 +339,7 @@ What's New in IDLE 1.1a3?
|
||||
window raising, especially in the Windows menu and in the debugger.
|
||||
IDLEfork 763524.
|
||||
|
||||
- If user passes a non-existant filename on the commandline, just
|
||||
- If user passes a non-existent filename on the commandline, just
|
||||
open a new file, don't raise a dialog. IDLEfork 854928.
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ builtin open function is defined in this module.
|
||||
|
||||
At the top of the I/O hierarchy is the abstract base class IOBase. It
|
||||
defines the basic interface to a stream. Note, however, that there is no
|
||||
seperation between reading and writing to streams; implementations are
|
||||
separation between reading and writing to streams; implementations are
|
||||
allowed to throw an IOError if they do not support a given operation.
|
||||
|
||||
Extending IOBase is RawIOBase which deals simply with the reading and
|
||||
@@ -1371,7 +1371,7 @@ class TextIOWrapper(TextIOBase):
|
||||
enabled. With this enabled, on input, the lines endings '\n', '\r',
|
||||
or '\r\n' are translated to '\n' before being returned to the
|
||||
caller. Conversely, on output, '\n' is translated to the system
|
||||
default line seperator, os.linesep. If newline is any other of its
|
||||
default line separator, os.linesep. If newline is any other of its
|
||||
legal values, that newline becomes the newline when the file is read
|
||||
and it is returned untranslated. On output, '\n' is converted to the
|
||||
newline.
|
||||
|
||||
@@ -1563,7 +1563,7 @@ class OptionParser (OptionContainer):
|
||||
"""print_usage(file : file = stdout)
|
||||
|
||||
Print the usage message for the current program (self.usage) to
|
||||
'file' (default stdout). Any occurence of the string "%prog" in
|
||||
'file' (default stdout). Any occurrence of the string "%prog" in
|
||||
self.usage is replaced with the name of the current program
|
||||
(basename of sys.argv[0]). Does nothing if self.usage is empty
|
||||
or not defined.
|
||||
@@ -1581,7 +1581,7 @@ class OptionParser (OptionContainer):
|
||||
"""print_version(file : file = stdout)
|
||||
|
||||
Print the version message for this program (self.version) to
|
||||
'file' (default stdout). As with print_usage(), any occurence
|
||||
'file' (default stdout). As with print_usage(), any occurrence
|
||||
of "%prog" in self.version is replaced by the current program's
|
||||
name. Does nothing if self.version is empty or undefined.
|
||||
"""
|
||||
|
||||
@@ -419,7 +419,7 @@ class MailmanProxy(PureProxy):
|
||||
s = StringIO(data)
|
||||
msg = Message.Message(s)
|
||||
# These headers are required for the proper execution of Mailman. All
|
||||
# MTAs in existance seem to add these if the original message doesn't
|
||||
# MTAs in existence seem to add these if the original message doesn't
|
||||
# have them.
|
||||
if not msg.get('from'):
|
||||
msg['From'] = mailfrom
|
||||
|
||||
@@ -446,9 +446,9 @@ def check_output(*popenargs, **kwargs):
|
||||
To capture standard error in the result, use stderr=subprocess.STDOUT.
|
||||
|
||||
>>> check_output(["/bin/sh", "-c",
|
||||
"ls -l non_existant_file ; exit 0"],
|
||||
"ls -l non_existent_file ; exit 0"],
|
||||
stderr=subprocess.STDOUT)
|
||||
'ls: non_existant_file: No such file or directory\n'
|
||||
'ls: non_existent_file: No such file or directory\n'
|
||||
"""
|
||||
if 'stdout' in kwargs:
|
||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||
@@ -850,7 +850,7 @@ class Popen(object):
|
||||
# cause random failures on win9x. Specifically a
|
||||
# dialog: "Your program accessed mem currently in
|
||||
# use at xxx" and a hopeful warning about the
|
||||
# stability of your system. Cost is Ctrl+C wont
|
||||
# stability of your system. Cost is Ctrl+C won't
|
||||
# kill children.
|
||||
creationflags |= CREATE_NEW_CONSOLE
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user