Commit Graph

2369 Commits

Author SHA1 Message Date
Fred Drake c58507582b Added a version annotation for StringTypes.
Added documentation for BooleanType.
2002-05-22 02:44:24 +00:00
Barry Warsaw c421ad4a35 Minor typo: Message.getall() -> Message.get_all() 2002-05-22 01:22:46 +00:00
Raymond Hettinger 6cf09f0792 Patch 543387. Document deprecation of complex %, //,and divmod(). 2002-05-21 18:19:49 +00:00
Raymond Hettinger 97394bc795 Patch 533291. Deprecate None return form of __reduce__. 2002-05-21 17:22:02 +00:00
Fred Drake 5ecb7aaa6a Add availability information for a couple of the types, and notes on writing
string-type tests for versions of Python built without Unicode support.
2002-05-21 14:28:22 +00:00
Raymond Hettinger cadc9fbd37 Patch 547037. Corrected documentation to match
actual module behavior for adding newlines.
2002-05-16 04:28:44 +00:00
Raymond Hettinger b07fa39edf Added missing index entries for mapping methods. Closes patch #548693. 2002-05-15 15:45:25 +00:00
Raymond Hettinger 576474c5ae Closes SF bug 527139. Brings docs inline with random.py 1.29
which fixes the unnecessarily restricted method domain.
2002-05-13 23:49:13 +00:00
Raymond Hettinger 5359ad63ce Correct gammavariate's method name and domain.
Partial solution to SF bug 527139.
2002-05-13 22:40:38 +00:00
Raymond Hettinger c045b49633 Added degrees() and radians() to mathmodule. Closing patch 552452 and
feature request 426539.
2002-05-13 03:52:47 +00:00
Fred Drake 1f89e2abcc Fix markup error that suppressed space.
Closes SF bug #554257.  Not relevant to older releases.
2002-05-10 12:37:56 +00:00
Fred Drake d05c74f42d Add a note explaining the interaction between unbuffered input and
xreadlines.xreadlines().
This closes SF patch #552804.
2002-05-06 16:02:42 +00:00
Fred Drake b9032018ff Update the xrange object description to reflect the removal of deprecated
features.
2002-05-02 21:37:23 +00:00
Fred Drake 4d707a5d08 Remove extra period produced by previous change. 2002-05-02 17:54:18 +00:00
Fred Drake 4b270518b7 Correct information on support for repietition & concatenation for buffer
and xrange objects.
This closes SF bug #550555.
2002-05-02 05:56:04 +00:00
Fred Drake 7f781c9aab Add Pickler.clear_memo() so the pickle and cPickle modules are more similar. 2002-05-01 20:33:53 +00:00
Fred Drake a65375c3e3 Explain what os.read() returns at end of file.
This closes SF bug #550409.  Applying to release21-maint & release22-maint.
2002-05-01 03:31:42 +00:00
Fred Drake 7938fab285 Add missing right-parenthesis. 2002-05-01 03:23:03 +00:00
Fred Drake 52cc670711 Add a note about when the "%r" formatting code was added. 2002-04-30 14:54:47 +00:00
Tim Peters 81b9251d59 Mostly in SequenceMatcher.{__chain_b, find_longest_match}:
This now does a dynamic analysis of which elements are so frequently
repeated as to constitute noise.  The primary benefit is an enormous
speedup in find_longest_match, as the innermost loop can have factors
of 100s less potential matches to worry about, in cases where the
sequences have many duplicate elements.  In effect, this zooms in on
sequences of non-ubiquitous elements now.

While I like what I've seen of the effects so far, I still consider
this experimental.  Please give it a try!
2002-04-29 01:37:32 +00:00
Fred Drake d3e6678713 Slightly expand and clarify the differences between getegid(), getgid(),
getpgrp(), and setpgid().
This closes SF bug #547939.
2002-04-26 20:59:40 +00:00
Fred Drake a7bb2b9b30 Be more consistent, both internally and with recommended practice.
This closes SF bug #547953.
2002-04-26 20:44:14 +00:00
Fred Drake 38f71973e5 Documentation for the enumerate() function/type.
This closes SF patch #547162.
2002-04-26 20:29:44 +00:00
Fred Drake 99d17006c1 Add text about circular references caused by storing frames in local
variables.  This closes SF bug #543148.
2002-04-23 21:21:20 +00:00
Fred Drake 106c1a0e7a WCOREDUMP(), WIFCONTINUED(), WCONTINUED, WUNTRACED: New.
isatty(), WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(): Changed to return
    bools instead of ints.
2002-04-23 15:58:02 +00:00
Anthony Baxter 8388895fe4 SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)
closes SF #514433

can now pass 'None' as the filename for the bsddb.*open functions,
and you'll get an in-memory temporary store.

docs are ripped out of the bsddb dbopen man page. Fred may want to
clean them up.

Considering this for 2.2, but not 2.1.
2002-04-23 02:11:05 +00:00
Walter Dörwald de02bcb265 Apply patch diff.txt from SF feature request
http://www.python.org/sf/444708

This adds the optional argument for str.strip
to unicode.strip too and makes it possible
to call str.strip with a unicode argument
and unicode.strip with a str argument.
2002-04-22 17:42:37 +00:00
Skip Montanaro b02ea65f92 typo 2002-04-17 19:33:06 +00:00
Fred Drake 933f159a2f Add a version annotation for the help() function. 2002-04-17 12:54:04 +00:00
Skip Montanaro 6c7bc31089 added small clarification to the descriptions of encode() and decode() 2002-04-16 15:12:10 +00:00
Fred Drake e19a5bcc7b Be consistent in presenting the signatures. 2002-04-15 19:46:40 +00:00
Fred Drake 154985587b Add docs for os.fchdir(). 2002-04-15 19:41:27 +00:00
Walter Dörwald 068325ef92 Apply the second version of SF patch http://www.python.org/sf/536241
Add a method zfill to str, unicode and UserString and change
Lib/string.py accordingly.

This activates the zfill version in unicodeobject.c that was
commented out and implements the same in stringobject.c. It also
adds the test for unicode support in Lib/string.py back in and
uses repr() instead() of str() (as it was before Lib/string.py 1.62)
2002-04-15 13:36:47 +00:00
Martin v. Löwis 06a83e90aa Patch #543447: Add posix.mknod. 2002-04-14 10:19:44 +00:00
Fred Drake 8b1c47bb8b Document the optional argument to the .strip(), .rstrip(), .strip() string
methods.
Part of SF feature #444708.
2002-04-13 02:43:39 +00:00
Fred Drake d4c0e5fd5b BDFL agreed with Tim: rehabilitate randint(). 2002-04-12 20:01:47 +00:00
Guido van Rossum e027d9818f Add Raymond Hettinger's d.pop(). See SF patch 539949. 2002-04-12 15:11:59 +00:00
Martin v. Löwis 81bdc93d2f Explain octal escapes. Fixes #542226. 2002-04-11 12:24:12 +00:00
Andrew M. Kuchling 2854c478be Remove mention of 'pre' module
(2.2 bugfix candidate?)
2002-04-10 21:28:31 +00:00
Skip Montanaro 3b2625ff82 document all the valid encoding values 2002-04-10 04:37:09 +00:00
Neal Norwitz 6b35370c65 Update docs for bool changes by Guido around April 6 2002-04-09 18:15:00 +00:00
Martin v. Löwis 688357e035 Patch #512005: getrusage() returns struct-like object. 2002-04-08 21:28:20 +00:00
Fred Drake bc82ab1c9f Do not call "knee" a standard module, and point to the new location.
This addresses the issue in SF bug #515745.
2002-04-08 05:22:30 +00:00
Neal Norwitz d3dab2b192 Update doc to reflect Tim's changes to bool. 2002-04-05 02:21:09 +00:00
Fred Drake a2c2595024 Add a version annotation regarding the urlopen(proxies={...}). 2002-04-04 20:58:02 +00:00
Fred Drake 5ca3a08cc0 The rest of the documentation for manual proxy configuration for a basic
urlopen().
This is part of SF patch #523415.
2002-04-04 20:34:36 +00:00
Fred Drake d21670328c Documentation for manual proxy configuration, by Andy Gimblett.
This closes SF patch #523415.
2002-04-04 20:09:50 +00:00
Neal Norwitz ce5df49957 SF 539024, Fix broken link to numpy 2002-04-04 14:02:45 +00:00
Guido van Rossum 77f6a65eb0 Add the 'bool' type and its values 'False' and 'True', as described in
PEP 285.  Everything described in the PEP is here, and there is even
some documentation.  I had to fix 12 unit tests; all but one of these
were printing Boolean outcomes that changed from 0/1 to False/True.
(The exception is test_unicode.py, which did a type(x) == type(y)
style comparison.  I could've fixed that with a single line using
issubtype(x, type(y)), but instead chose to be explicit about those
places where a bool is expected.

Still to do: perhaps more documentation; change standard library
modules to return False/True from predicates.
2002-04-03 22:41:51 +00:00
Fred Drake aee113d368 Add an experimental mechanism to support extending the pprint formatting.
Partly responds to SF bug #505152.
2002-04-02 05:08:35 +00:00
Fred Drake 4dfb7a81c1 Explain that os.spawn*() return the process handle on Windows.
Clarify that os.waitpid() on Windows takes a process handle, not a process ID.
This closes SF bug #537582.
2002-04-01 23:30:47 +00:00
Fred Drake d5a072f2eb Fix up the documentation of the type codes to give both the C and Python
types for each code, and give the actual C types.

Clarified the support for slice operations and note when some TypeError
exceptions are raised.

This closes SF bugs 518767 and 536469.
2002-04-01 23:05:10 +00:00
Fred Drake 8d62e94761 Minor wording change. 2002-03-28 21:06:17 +00:00
Skip Montanaro bb6bbc45c0 add exception class hierarchy. This should probably be done differently,
but at least the content is there.
2002-03-28 20:53:22 +00:00
Fred Drake 47cdf6fb6f Add documentation on the hasfree data object. 2002-03-28 19:34:53 +00:00
Fred Drake e3a3ceb2b1 Minor consistency adjustments. 2002-03-28 12:40:45 +00:00
Martin v. Löwis 2e64c34850 Expose C library's gettext. Fixes #516412. 2002-03-27 18:49:02 +00:00
Skip Montanaro 8a79727b53 add seealso referring to site module doc where people can learn how to
extend sys.path using .pth files.
2002-03-27 17:29:50 +00:00
Fred Drake 57f8e06e4f Document the finditer() function and method.
This closes SF bug #520904.

Explain that many of the escapes supported by string literals are also
supported by the RE compiler, and list which ones.
This closes SF bug #529923.
2002-03-25 20:22:59 +00:00
Fred Drake 3787c9d94c Added description of binhex.Error. 2002-03-25 16:37:56 +00:00
Skip Montanaro 1e962cb61b document InvalidURL exception 2002-03-24 16:55:57 +00:00
Neil Schemenauer ccbb0edf0e Add local_hostname to SMTP.__init__(). 2002-03-24 15:41:40 +00:00
Neil Schemenauer 79f181395b Add more example exceptions that unpickling can raise. 2002-03-22 22:16:03 +00:00
Neal Norwitz e22d3dfcc1 Fix grammar 2002-03-21 12:58:54 +00:00
Walter Dörwald b25c2b0a4a [Apply SF patch #504943]
This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
2002-03-21 10:38:40 +00:00
Neal Norwitz 1abca4a515 SF# 522426, add doc for common parameter for filecmp.cmpfiles() 2002-03-20 18:55:09 +00:00
Fred Drake 1268678395 Adjust some poor wording in the text that explains what events are used
for (reported by Keith Briggs).
Wrap some very long lines.
2002-03-19 14:37:44 +00:00
Fred Drake 2f31d561d5 Clarify that copy_reg.pickle() is not intended for use with "classic" classes.
This was stated before, but a minor grammatical error made it difficult to be
sure of the meaning.
This closes SF bug #530143.
2002-03-19 03:33:33 +00:00
Fred Drake a8b663806b Remove extra verb; reported by Detlef Lannert. 2002-03-18 16:45:01 +00:00
Martin v. Löwis 5c137c2251 Patch #495598: add an -q (quiet) option to pycompile. 2002-03-18 12:44:08 +00:00
Skip Montanaro 10acc8f9e2 added note that xmlrpclib won't marshal instances of subclasses of the
builtin types
2002-03-17 23:15:02 +00:00
Martin v. Löwis 587c98c863 Patch #430706: Persistent connections in BaseHTTPServer. 2002-03-17 18:37:22 +00:00
Fred Drake 8e0c82a35f Fix stupid typo in example. 2002-03-16 14:01:12 +00:00
Fred Drake f275803fe9 Clarify the descriptions of the positive and negative lookbehind assertions.
Added examples of positive lookbehind assertions.
This closes SF bug #529708.
2002-03-16 05:58:12 +00:00
Skip Montanaro dc8d40717c update text to refer to ServerProxy class in preference to Server, which is
only retained for backward compatibility with older versions of the library.
2002-03-14 17:35:25 +00:00
Fred Drake f981617645 "level" keyword argument in example should be "stacklevel".
This closes SF bug #517684.
2002-03-12 19:49:31 +00:00
Tim Peters 8f01b680c8 Change Windows file.truncate() to (a) restore the original file position,
and (b) stop trying to prevent file growth.

Beef up the file.truncate() docs.

Change test_largefile.py to stop assuming that f.truncate() moves the
file pointer to the truncation point, and to verify instead that it leaves
the file position alone.  Remove the test for what happens when a
specified size exceeds the original file size (it's ill-defined, according
to the Single Unix Spec).
2002-03-12 03:04:44 +00:00
Tim Peters fb05db2cae file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.
2002-03-11 00:24:00 +00:00
Andrew M. Kuchling 10b3eac278 [Bug #486527] Note that the caller has to ensure there are no control
characters in strings being passed via XML-RPC.
Fix some typos.

2.2.1 bugfix candidate.
2002-03-08 17:46:02 +00:00
Piers Lauder a4f8313cbb add SSL class submitted by Tino Lange 2002-03-08 01:53:24 +00:00
Fred Drake da8a6dd072 Added missing version annotation for dict(). 2002-03-06 02:29:30 +00:00
Fred Drake 9479c958c5 Remove extra indenatation from sample interpreter session.
Remove whitespace from the middle of an inline RE example; it was OK for
the typeset formats, but LaTeX2HTML is more touchy about this.
2002-03-05 04:02:39 +00:00
Skip Montanaro a8e1d81bdc add simple example of avoiding backtracking 2002-03-04 23:08:28 +00:00
Martin v. Löwis 29001ff234 Patch #523268, #522027: return enhanced tuples. 2002-03-01 10:47:37 +00:00
Martin v. Löwis dbd55b3737 Patch #523268, #522027: return enhanced tuples. 2002-03-01 10:38:44 +00:00
Martin v. Löwis 9986633609 Patch 520694: arraymodule.c improvements:
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
2002-03-01 10:27:01 +00:00
Fred Drake b6b2aa6c75 Fix error in explanation of the interaction between $ and MULTILINE mode.
Reported by Steve Alexander.
2002-02-25 18:56:45 +00:00
Tim Peters 9f4341b3b0 SF bug #501591: dir() doc is old
Bugfix candidate.

+ Updated dir() description to match actual 2.2 behavior.

+ Replaced the dir(sys) example with dir(struct), because the former
  was way out of date and is bound to change frequently, while the
  latter is stable.

+ Added a note cautioning that dir() is supplied primarily for
  convenience at an interactive prompt (hoping to discourage its
  use as the foundation of introspective code outside the core).
2002-02-23 04:40:15 +00:00
Greg Ward f8b1f2431b Grammar tweak. 2002-02-22 21:24:32 +00:00
Neal Norwitz ba902fda3c SF #515041, Update path for 2.3 2002-02-19 02:58:54 +00:00
Fred Drake e73ad2a21f Use the standard expression for the availability statement for alarm(). 2002-02-15 20:59:43 +00:00
Skip Montanaro 8d1fdafd89 note that the alarm function is not available on Windows. 2002-02-15 20:36:19 +00:00
Fred Drake 928051fb26 The "%" character does not need to be escaped in verbatim environments.
This closes SF bug #517811.
2002-02-15 04:12:59 +00:00
Fred Drake 7bc6f7ac7b Consistently use \textasciicircum to produce a ^ character.
LaTeX really falls flat on this one!
2002-02-14 15:19:30 +00:00
Tim Peters ab034fab03 Implement os.waitpid() for Windows, in a way that's compatible with Linux
where their capabilities intersect.  Would be nice if people using non-
MSVC compilers (Borland etc) took a whack at doing something similar for
them (this code relies on the MS _cwait function).
2002-02-01 11:27:43 +00:00
Skip Montanaro c318260a71 added handle_error method description 2002-01-31 17:32:24 +00:00
Tim Peters c48a3ca161 Add new constants usable with os.popen() on Windows.
NOTE:  this seems a mess wrt which symbols are available on which
platforms.  I can't fix it, but I didn't add to it <wink>, and
included an XXX comment about names claimed to be available on
Windows that aren't.  If anyone can figure out the whole ugly truth,
I'm sure a better organization will suggest itself.
2002-01-30 05:49:46 +00:00
Martin v. Löwis ef180dc3d0 Document that get_referrers can return unreachable but uncollected objects.
Fixes #505453.
2002-01-26 20:11:50 +00:00
Fred Drake 744f67fb62 Add keyword.kwlist to the public API. 2002-01-24 16:38:53 +00:00
Guido van Rossum 4f3a62d9bc There's no need for typechecks on the second and third argument of
new.instancemethod() -- the instancemethod object is now a perfectly
general container.

This fixes SF bug ##503091 (Pedro Rodriquez): new.instancemethod fails
for new classes

This is a 2.2.1 candidate.
2002-01-15 19:21:05 +00:00