mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Merge 3.3, issue #17047: remove doubled words found in 2.7 to
3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett.
This commit is contained in:
		
						commit
						16b5c13668
					
				
					 13 changed files with 40 additions and 38 deletions
				
			
		|  | @ -303,7 +303,7 @@ def _unsupported(self, name): | ||||||
|     def seek(self, pos, whence=0): |     def seek(self, pos, whence=0): | ||||||
|         """Change stream position. |         """Change stream position. | ||||||
| 
 | 
 | ||||||
|         Change the stream position to byte offset offset. offset is |         Change the stream position to byte offset pos. Argument pos is | ||||||
|         interpreted relative to the position indicated by whence.  Values |         interpreted relative to the position indicated by whence.  Values | ||||||
|         for whence are ints: |         for whence are ints: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -517,7 +517,7 @@ def map(self, fn, *iterables, timeout=None): | ||||||
|         """Returns a iterator equivalent to map(fn, iter). |         """Returns a iterator equivalent to map(fn, iter). | ||||||
| 
 | 
 | ||||||
|         Args: |         Args: | ||||||
|             fn: A callable that will take take as many arguments as there are |             fn: A callable that will take as many arguments as there are | ||||||
|                 passed iterables. |                 passed iterables. | ||||||
|             timeout: The maximum number of seconds to wait. If None, then there |             timeout: The maximum number of seconds to wait. If None, then there | ||||||
|                 is no limit on the wait time. |                 is no limit on the wait time. | ||||||
|  |  | ||||||
|  | @ -263,8 +263,8 @@ def finalize_options(self): | ||||||
| 
 | 
 | ||||||
|         if self.user and (self.prefix or self.exec_prefix or self.home or |         if self.user and (self.prefix or self.exec_prefix or self.home or | ||||||
|                 self.install_base or self.install_platbase): |                 self.install_base or self.install_platbase): | ||||||
|             raise DistutilsOptionError("can't combine user with with prefix/" |             raise DistutilsOptionError("can't combine user with prefix, " | ||||||
|                                        "exec_prefix/home or install_(plat)base") |                                        "exec_prefix/home, or install_(plat)base") | ||||||
| 
 | 
 | ||||||
|         # Next, stuff that's wrong (or dubious) only on certain platforms. |         # Next, stuff that's wrong (or dubious) only on certain platforms. | ||||||
|         if os.name != "posix": |         if os.name != "posix": | ||||||
|  |  | ||||||
|  | @ -165,7 +165,7 @@ def test_finalize_options(self): | ||||||
|         cmd.home = 'home' |         cmd.home = 'home' | ||||||
|         self.assertRaises(DistutilsOptionError, cmd.finalize_options) |         self.assertRaises(DistutilsOptionError, cmd.finalize_options) | ||||||
| 
 | 
 | ||||||
|         # can't combine user with with prefix/exec_prefix/home or |         # can't combine user with prefix/exec_prefix/home or | ||||||
|         # install_(plat)base |         # install_(plat)base | ||||||
|         cmd.prefix = None |         cmd.prefix = None | ||||||
|         cmd.user = 'user' |         cmd.user = 'user' | ||||||
|  |  | ||||||
|  | @ -486,7 +486,7 @@ def storbinary(self, cmd, fp, blocksize=8192, callback=None, rest=None): | ||||||
|           blocksize: The maximum data size to read from fp and send over |           blocksize: The maximum data size to read from fp and send over | ||||||
|                      the connection at once.  [default: 8192] |                      the connection at once.  [default: 8192] | ||||||
|           callback: An optional single parameter callable that is called on |           callback: An optional single parameter callable that is called on | ||||||
|                     on each block of data after it is sent.  [default: None] |                     each block of data after it is sent.  [default: None] | ||||||
|           rest: Passed to transfercmd().  [default: None] |           rest: Passed to transfercmd().  [default: None] | ||||||
| 
 | 
 | ||||||
|         Returns: |         Returns: | ||||||
|  | @ -513,7 +513,7 @@ def storlines(self, cmd, fp, callback=None): | ||||||
|           cmd: A STOR command. |           cmd: A STOR command. | ||||||
|           fp: A file-like object with a readline() method. |           fp: A file-like object with a readline() method. | ||||||
|           callback: An optional single parameter callable that is called on |           callback: An optional single parameter callable that is called on | ||||||
|                     on each line after it is sent.  [default: None] |                     each line after it is sent.  [default: None] | ||||||
| 
 | 
 | ||||||
|         Returns: |         Returns: | ||||||
|           The response code. |           The response code. | ||||||
|  |  | ||||||
|  | @ -54,7 +54,7 @@ Extensions are not required to define menu entries for all the events they | ||||||
| implement.  (They are also not required to create keybindings, but in that | implement.  (They are also not required to create keybindings, but in that | ||||||
| case there must be empty bindings in cofig-extensions.def) | case there must be empty bindings in cofig-extensions.def) | ||||||
| 
 | 
 | ||||||
| Here is a complete example example: | Here is a complete example: | ||||||
| 
 | 
 | ||||||
| class ZoomHeight: | class ZoomHeight: | ||||||
| 
 | 
 | ||||||
|  | @ -72,7 +72,7 @@ class ZoomHeight: | ||||||
|         "...Do what you want here..." |         "...Do what you want here..." | ||||||
| 
 | 
 | ||||||
| The final piece of the puzzle is the file "config-extensions.def", which is | The final piece of the puzzle is the file "config-extensions.def", which is | ||||||
| used to to configure the loading of extensions and to establish key (or, more | used to configure the loading of extensions and to establish key (or, more | ||||||
| generally, event) bindings to the virtual events defined in the extensions. | generally, event) bindings to the virtual events defined in the extensions. | ||||||
| 
 | 
 | ||||||
| See the comments at the top of config-extensions.def for information.  It's | See the comments at the top of config-extensions.def for information.  It's | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| For security reasons, GvR requested that Idle's Python execution server process | For security reasons, GvR requested that Idle's Python execution server process | ||||||
| connect to the Idle process, which listens for the connection.  Since Idle has | connect to the Idle process, which listens for the connection.  Since Idle has | ||||||
| has only one client per server, this was not a limitation. | only one client per server, this was not a limitation. | ||||||
| 
 | 
 | ||||||
|    +---------------------------------+ +-------------+ |    +---------------------------------+ +-------------+ | ||||||
|    | socketserver.BaseRequestHandler | | SocketIO    | |    | socketserver.BaseRequestHandler | | SocketIO    | | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class Grammar(object): | class Grammar(object): | ||||||
|     """Pgen parsing tables tables conversion class. |     """Pgen parsing tables conversion class. | ||||||
| 
 | 
 | ||||||
|     Once initialized, this class supplies the grammar tables for the |     Once initialized, this class supplies the grammar tables for the | ||||||
|     parsing engine implemented by parse.py.  The parsing engine |     parsing engine implemented by parse.py.  The parsing engine | ||||||
|  | @ -45,7 +45,7 @@ class Grammar(object): | ||||||
|                      these two are each other's inverse. |                      these two are each other's inverse. | ||||||
| 
 | 
 | ||||||
|     states        -- a list of DFAs, where each DFA is a list of |     states        -- a list of DFAs, where each DFA is a list of | ||||||
|                      states, each state is is a list of arcs, and each |                      states, each state is a list of arcs, and each | ||||||
|                      arc is a (i, j) pair where i is a label and j is |                      arc is a (i, j) pair where i is a label and j is | ||||||
|                      a state number.  The DFA number is the index into |                      a state number.  The DFA number is the index into | ||||||
|                      this list.  (This name is slightly confusing.) |                      this list.  (This name is slightly confusing.) | ||||||
|  |  | ||||||
|  | @ -325,7 +325,7 @@ def make_short(self, file): | ||||||
| 
 | 
 | ||||||
|     def add_file(self, file, src=None, version=None, language=None): |     def add_file(self, file, src=None, version=None, language=None): | ||||||
|         """Add a file to the current component of the directory, starting a new one |         """Add a file to the current component of the directory, starting a new one | ||||||
|         one if there is no current component. By default, the file name in the source |         if there is no current component. By default, the file name in the source | ||||||
|         and the file table will be identical. If the src file is specified, it is |         and the file table will be identical. If the src file is specified, it is | ||||||
|         interpreted relative to the current directory. Optionally, a version and a |         interpreted relative to the current directory. Optionally, a version and a | ||||||
|         language can be specified for the entry in the File table.""" |         language can be specified for the entry in the File table.""" | ||||||
|  |  | ||||||
|  | @ -319,7 +319,7 @@ class passed as the first argument of foo() is the class involved in the | ||||||
|     ...         return self.__set(inst, value) |     ...         return self.__set(inst, value) | ||||||
| 
 | 
 | ||||||
| Now let's define a class with an attribute x defined by a pair of methods, | Now let's define a class with an attribute x defined by a pair of methods, | ||||||
| getx() and and setx(): | getx() and setx(): | ||||||
| 
 | 
 | ||||||
|     >>> class C(object): |     >>> class C(object): | ||||||
|     ... |     ... | ||||||
|  |  | ||||||
|  | @ -872,7 +872,7 @@ def testGetServBy(self): | ||||||
|         # Try same call with optional protocol omitted |         # Try same call with optional protocol omitted | ||||||
|         port2 = socket.getservbyname(service) |         port2 = socket.getservbyname(service) | ||||||
|         eq(port, port2) |         eq(port, port2) | ||||||
|         # Try udp, but don't barf it it doesn't exist |         # Try udp, but don't barf if it doesn't exist | ||||||
|         try: |         try: | ||||||
|             udpport = socket.getservbyname(service, 'udp') |             udpport = socket.getservbyname(service, 'udp') | ||||||
|         except OSError: |         except OSError: | ||||||
|  |  | ||||||
|  | @ -1901,38 +1901,39 @@ def set(self, x, y, itemtype=None, **kw): | ||||||
|         self.tk.call(self, 'set', x, y, *args) |         self.tk.call(self, 'set', x, y, *args) | ||||||
| 
 | 
 | ||||||
|     def size_column(self, index, **kw): |     def size_column(self, index, **kw): | ||||||
|         """Queries  or  sets the size of the column given by |         """Queries or sets the size of the column given by | ||||||
|         INDEX.  INDEX may be any  non-negative |         INDEX.  INDEX may be any non-negative | ||||||
|         integer  that  gives  the  position  of a given column. |         integer that gives the position of a given column. | ||||||
|         INDEX can also be the string "default"; in this case, this command |         INDEX can also be the string "default"; in this case, this command | ||||||
|         queries or sets the default size of all columns. |         queries or sets the default size of all columns. | ||||||
|         When  no  option-value  pair is given, this command returns a tuple |         When no option-value pair is given, this command returns a tuple | ||||||
|         containing the current size setting of the given  column.  When |         containing the current size setting of the given column.  When | ||||||
|         option-value  pairs  are  given,  the corresponding options of the |         option-value pairs are given, the corresponding options of the | ||||||
|         size setting of the given column are changed. Options may be one |         size setting of the given column are changed. Options may be one | ||||||
|         of  the  follwing: |         of the follwing: | ||||||
|               pad0 pixels |               pad0 pixels | ||||||
|                      Specifies the paddings to the left of a column. |                      Specifies the paddings to the left of a column. | ||||||
|               pad1 pixels |               pad1 pixels | ||||||
|                      Specifies the paddings to the right of a  column. |                      Specifies the paddings to the right of a column. | ||||||
|               size val |               size val | ||||||
|                      Specifies  the  width of a column . |                      Specifies the width of a column.  Val may be: | ||||||
|                      Val may be: "auto" -- the width of the column is set the |                      "auto" -- the width of the column is set to the | ||||||
|                      the widest cell in the column; a valid Tk screen distance |                      width of the widest cell in the column; | ||||||
|                      unit; or a real number following by the word chars |                      a valid Tk screen distance unit; | ||||||
|  |                      or a real number following by the word chars | ||||||
|                      (e.g. 3.4chars) that sets the width of the column to the |                      (e.g. 3.4chars) that sets the width of the column to the | ||||||
|                      given number of characters.""" |                      given number of characters.""" | ||||||
|         return self.tk.split(self.tk.call(self._w, 'size', 'column', index, |         return self.tk.split(self.tk.call(self._w, 'size', 'column', index, | ||||||
|                              *self._options({}, kw))) |                              *self._options({}, kw))) | ||||||
| 
 | 
 | ||||||
|     def size_row(self, index, **kw): |     def size_row(self, index, **kw): | ||||||
|         """Queries  or  sets the size of the row given by |         """Queries or sets the size of the row given by | ||||||
|         INDEX. INDEX may be any  non-negative |         INDEX. INDEX may be any non-negative | ||||||
|         integer  that  gives  the  position  of a given row . |         integer that gives the position of a given row . | ||||||
|         INDEX can also be the string "default"; in this case, this command |         INDEX can also be the string "default"; in this case, this command | ||||||
|         queries or sets the default size of all rows. |         queries or sets the default size of all rows. | ||||||
|         When  no option-value pair is given, this command returns a list con- |         When no option-value pair is given, this command returns a list con- | ||||||
|         taining the current size setting of the given  row . When option-value |         taining the current size setting of the given row . When option-value | ||||||
|         pairs are given, the corresponding options of the size setting of the |         pairs are given, the corresponding options of the size setting of the | ||||||
|         given row are changed. Options may be one of the follwing: |         given row are changed. Options may be one of the follwing: | ||||||
|               pad0 pixels |               pad0 pixels | ||||||
|  | @ -1940,10 +1941,11 @@ def size_row(self, index, **kw): | ||||||
|               pad1 pixels |               pad1 pixels | ||||||
|                      Specifies the paddings to the bottom of a row. |                      Specifies the paddings to the bottom of a row. | ||||||
|               size val |               size val | ||||||
|                      Specifies  the height of a row. |                      Specifies the height of a row.  Val may be: | ||||||
|                      Val may be: "auto" -- the height of the row  is  set  the |                      "auto" -- the height of the row is set to the | ||||||
|                      the highest cell in the row; a valid Tk screen distance |                      height of the highest cell in the row; | ||||||
|                      unit; or a real number following by the word chars |                      a valid Tk screen distance unit; | ||||||
|  |                      or a real number following by the word chars | ||||||
|                      (e.g. 3.4chars) that sets the height of the row to the |                      (e.g. 3.4chars) that sets the height of the row to the | ||||||
|                      given number of characters.""" |                      given number of characters.""" | ||||||
|         return self.tk.split(self.tk.call( |         return self.tk.split(self.tk.call( | ||||||
|  |  | ||||||
|  | @ -856,8 +856,8 @@ def numinput(self, title, prompt, default=None, minval=None, maxval=None): | ||||||
| class Terminator (Exception): | class Terminator (Exception): | ||||||
|     """Will be raised in TurtleScreen.update, if _RUNNING becomes False. |     """Will be raised in TurtleScreen.update, if _RUNNING becomes False. | ||||||
| 
 | 
 | ||||||
|     Thus stops execution of turtle graphics script. Main purpose: use in |     This stops execution of a turtle graphics script. | ||||||
|     in the Demo-Viewer turtle.Demo.py. |     Main purpose: use in the Demo-Viewer turtle.Demo.py. | ||||||
|     """ |     """ | ||||||
|     pass |     pass | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Terry Jan Reedy
						Terry Jan Reedy