mirror of https://github.com/python/cpython
Merged revisions 69987,70002,70061 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69987 | benjamin.peterson | 2009-02-26 01:30:11 +0100 (Do, 26 Feb 2009) | 1 line fix str.format()'s first arg #5371 ........ r70002 | andrew.kuchling | 2009-02-26 23:34:30 +0100 (Do, 26 Feb 2009) | 1 line The curses panel library is now supported ........ r70061 | hirokazu.yamamoto | 2009-02-28 16:24:00 +0100 (Sa, 28 Feb 2009) | 1 line Binary flag is needed on windows. ........
This commit is contained in:
parent
bbdbea70e1
commit
d3717c50d3
|
@ -426,7 +426,7 @@ quirks, and provide complete lists of all the functions, attributes, and
|
||||||
Because the curses API is so large, some functions aren't supported in the
|
Because the curses API is so large, some functions aren't supported in the
|
||||||
Python interface, not because they're difficult to implement, but because no one
|
Python interface, not because they're difficult to implement, but because no one
|
||||||
has needed them yet. Feel free to add them and then submit a patch. Also, we
|
has needed them yet. Feel free to add them and then submit a patch. Also, we
|
||||||
don't yet have support for the menus or panels libraries associated with
|
don't yet have support for the menu library associated with
|
||||||
ncurses; feel free to add that.
|
ncurses; feel free to add that.
|
||||||
|
|
||||||
If you write an interesting little program, feel free to contribute it as
|
If you write an interesting little program, feel free to contribute it as
|
||||||
|
|
|
@ -99,10 +99,10 @@ memory but does not update the underlying file.
|
||||||
import mmap
|
import mmap
|
||||||
|
|
||||||
# write a simple example file
|
# write a simple example file
|
||||||
with open("hello.txt", "w") as f:
|
with open("hello.txt", "wb") as f:
|
||||||
f.write("Hello Python!\n")
|
f.write("Hello Python!\n")
|
||||||
|
|
||||||
with open("hello.txt", "r+") as f:
|
with open("hello.txt", "r+b") as f:
|
||||||
# memory-map the file, size 0 means whole file
|
# memory-map the file, size 0 means whole file
|
||||||
map = mmap.mmap(f.fileno(), 0)
|
map = mmap.mmap(f.fileno(), 0)
|
||||||
# read content via standard file methods
|
# read content via standard file methods
|
||||||
|
|
|
@ -861,7 +861,7 @@ string functions based on regular expressions.
|
||||||
found.
|
found.
|
||||||
|
|
||||||
|
|
||||||
.. method:: str.format(format_string, *args, **kwargs)
|
.. method:: str.format(*args, **kwargs)
|
||||||
|
|
||||||
Perform a string formatting operation. The *format_string* argument can
|
Perform a string formatting operation. The *format_string* argument can
|
||||||
contain literal text or replacement fields delimited by braces ``{}``. Each
|
contain literal text or replacement fields delimited by braces ``{}``. Each
|
||||||
|
|
Loading…
Reference in New Issue