summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
Commit message (Collapse)AuthorAgeFilesLines
...
* * Added missing documentation for object().Raymond Hettinger2003-06-111-2/+15
| | | | * Noted the Py2.3 in the optional arg for bool().
* SF bug #660022: parameters for int(), str(), etc.Raymond Hettinger2003-06-111-19/+28
| | | | | | * Indicate that arguments are optional for most builtin type constructors. * Replace e.g. in staticmethod() and classmethod() docs. * Add \code{} markup to some in-line code examples.
* SF bug: 751941 Invisible HTML tagRaymond Hettinger2003-06-101-0/+2
| | | | Added missing jump target labels.
* Patch #744877: Explain filter in terms of list comprehension. RemoveMartin v. Löwis2003-05-311-3/+8
| | | | | explanation of int in terms of string.atoi. Explain sum in terms of reduce.
* - object is a class type, not a functionFred Drake2003-05-101-3/+4
| | | | | - when marking a function, the trailing () should be included consistently
* Missing parenthesis found by texcheck.pyRaymond Hettinger2003-05-101-1/+1
|
* - explain the start argument to sum()Fred Drake2003-04-221-5/+6
| | | | - various adjustments to sum() markup and explanation
* Adding new built-in function sum, with docs and tests.Alex Martelli2003-04-221-0/+8
|
* Change the treatment of positions returned by PEP293Walter Dörwald2003-01-311-1/+1
| | | | | | | | | | | | | | | | error handers in the Unicode codecs: Negative positions are treated as being relative to the end of the input and out of bounds positions result in an IndexError. Also update the PEP and include an explanation of this in the documentation for codecs.register_error. Fixes a small bug in iconv_codecs: if the position from the callback is negative *add* it to the size instead of substracting it. From SF patch #677429.
* SF bug #655271: Slightly modify locals() docRaymond Hettinger2003-01-041-1/+1
| | | | Clarify the operation of locals().
* Document that apply() is deprecated. See:Fred Drake2003-01-021-0/+3
| | | | http://mail.python.org/pipermail/python-dev/2003-January/031556.html
* Fix SF # 641111, Undocumented side effect of evalNeal Norwitz2002-12-171-1/+6
| | | | | | | | Try to clear up confusion about the current globals being copied into a globals dict passed to eval(). This wording (more or less) was suggested in bug report. It should probably be made clearer. Backport candidate.
* Fix SF #642742, property() builtin not documentedNeal Norwitz2002-12-171-0/+78
| | | | | | | | Added doc for functions new to 2.2: classmethod property staticmethod super Taken from docstrings. Could use review. Hope there wasn't a reason why these shouldn't have been added. Backport candidate.
* Enhance issubclass() and PyObject_IsSubclass() so that a tuple isWalter Dörwald2002-12-121-5/+7
| | | | | | | | | | | supported as the second argument. This has the same meaning as for isinstance(), i.e. issubclass(X, (A, B)) is equivalent to issubclass(X, A) or issubclass(X, B). Compared to isinstance(), this patch does not search the tuple recursively for classes, i.e. any entry in the tuple that is not a class, will result in a TypeError. This closes SF patch #649608.
* Added change note about returning a dictionary based on keywordFred Drake2002-11-231-0/+2
| | | | arguments.
* Patch #642500 with slight modifications: allow keyword arguments inJust van Rossum2002-11-231-14/+21
| | | | | | | dict() constructor. Example: >>> dict(a=1, b=2) {'a': 1, 'b': 2} >>>
* Change int() so that passing a string, unicode, float or long argumentWalter Dörwald2002-11-191-0/+2
| | | | | | | that is outside the integer range no longer raises OverflowError, but returns a long object instead. This fixes SF bug http://www.python.org/sf/635115
* Update example for the type() function to use the currently acceptedFred Drake2002-11-011-2/+13
| | | | | | | preference of using "is" instead of "==" to compare types, use built-in names where available, and point to the isinstance() function. Closes SF bug #632196.
* Modify example to use string methods instead of the string module.Fred Drake2002-10-221-4/+2
|
* Another try at clarifying what goes into and comes out of Unicode objects.Fred Drake2002-09-241-4/+0
|
* Clarify that len() of a Unicode string returns the number of storage units,Fred Drake2002-09-241-0/+4
| | | | not abstract characters.
* Fix typoRaymond Hettinger2002-09-041-1/+1
|
* Add a note that apply() is needed since the extended call syntax isFred Drake2002-08-221-0/+2
| | | | completely equivalent.
* SF patch 576101, by Oren Tirosh: alternative implementation ofGuido van Rossum2002-08-191-2/+4
| | | | | | | | interning. I modified Oren's patch significantly, but the basic idea and most of the implementation is unchanged. Interned strings created with PyString_InternInPlace() are now mortal, and you must keep a reference to the resulting string around; use the new function PyString_InternImmortal() to create immortal interned strings.
* reduce(): Clarified what is returned in the case of a sequence 1 item long andFred Drake2002-07-171-6/+6
| | | | initial/default value.
* Note that unicode() can raise LookupError for unknown codecs.Fred Drake2002-07-091-1/+2
| | | | Closes SF bug #513666.
* Fix typo: "an Unicode string" --> "a Unicode string"Fred Drake2002-07-081-2/+2
| | | | Clarify the return value when the parameter is a Unicode object.
* Clarify the version information for the unicode() built-in.Fred Drake2002-06-291-6/+9
| | | | Closes SF bug #575272.
* Add a note that divmod() with complex numbers is deprecated.Fred Drake2002-06-201-0/+3
|
* Jack's documentation for the U mode character on the file()Barry Warsaw2002-05-221-0/+15
| | | | constructor, vetted by Barry.
* Patch 543387. Document deprecation of complex %, //,and divmod().Raymond Hettinger2002-05-211-3/+3
|
* Documentation for the enumerate() function/type.Fred Drake2002-04-261-0/+12
| | | | This closes SF patch #547162.
* Add a version annotation for the help() function.Fred Drake2002-04-171-0/+1
|
* Add the 'bool' type and its values 'False' and 'True', as described inGuido van Rossum2002-04-031-0/+10
| | | | | | | | | | | | | 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.
* Added missing version annotation for dict().Fred Drake2002-03-061-0/+2
|
* SF bug #501591: dir() doc is oldTim Peters2002-02-231-9/+22
| | | | | | | | | | | | | | 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).
* Add documentation for the help() built-in; contributed by Ka-Ping Yee.Fred Drake2001-12-181-0/+10
| | | | This is part of SF patch #494622.
* Ensure that complex() only accepts a string argument as the first arg,Fred Drake2001-12-131-3/+5
| | | | | and only if there is no second arg. This closes SF patch #479551.
* Minor clarification of the zip() description, based on a comment sent toFred Drake2001-12-031-1/+1
| | | | python-docs.
* Remove most references to __members__ and __methods__, leaving only one pairFred Drake2001-12-031-2/+2
| | | | | | of references that now state that these attributes have been removed, directing the reader to the dir() function. This closes SF bug #456420.
* When referring to a formal parameter from the description, use the name givenFred Drake2001-11-071-1/+1
| | | | with the signature, not an ad hoc abbreviated form.
* apply() documentation: Remove a detail about the implementation that doesFred Drake2001-11-071-5/+6
| | | | | not affect the API. Clean up the text about call syntax apply() is equivalent to. Based on comments by Thomas Guettler.
* Rename "dictionary" (type and constructor) to "dict".Tim Peters2001-10-291-7/+7
|
* Some style changes and typo fixes.Fred Drake2001-10-261-6/+9
|
* Generalize dictionary() to accept a sequence of 2-sequences. At theTim Peters2001-10-261-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | outer level, the iterator protocol is used for memory-efficiency (the outer sequence may be very large if fully materialized); at the inner level, PySequence_Fast() is used for time-efficiency (these should always be sequences of length 2). dictobject.c, new functions PyDict_{Merge,Update}FromSeq2. These are wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2- sequences argument instead of a mapping object. For now, I left these functions file static, so no corresponding doc changes. It's tempting to change dict.update() to allow a sequence-of-2-seqs argument too. Also changed the name of dictionary's keyword argument from "mapping" to "x". Got a better name? "mapping_or_sequence_of_pairs" isn't attractive, although more so than "mosop" <wink>. abstract.h, abstract.tex: Added new PySequence_Fast_GET_SIZE function, much faster than going thru the all-purpose PySequence_Size. libfuncs.tex: - Document dictionary(). - Fiddle tuple() and list() to admit that their argument is optional. - The long-winded repetitions of "a sequence, a container that supports iteration, or an iterator object" is getting to be a PITA. Many months ago I suggested factoring this out into "iterable object", where the definition of that could include being explicit about generators too (as is, I'm not sure a reader outside of PythonLabs could guess that "an iterator object" includes a generator call). - Please check my curly braces -- I'm going blind <0.9 wink>. abstract.c, PySequence_Tuple(): When PyObject_GetIter() fails, leave its error msg alone now (the msg it produces has improved since PySequence_Tuple was generalized to accept iterable objects, and PySequence_Tuple was also stomping on the msg in cases it shouldn't have even before PyObject_GetIter grew a better msg).
* Additional test and documentation for the unicode() changes.Marc-André Lemburg2001-10-191-13/+27
| | | | This patch should also be applied to the 2.2b1 trunk.
* Update the documentation for the isinstance() function to reflect recentFred Drake2001-10-091-221/+226
| | | | | changes in the implementation. Indented all descriptions consistently.
* Make clear that tuple() accepts the same kind of arguments as list().Tim Peters2001-10-041-1/+3
|
* The execfile() docs imply it acts on locals same as exec. But in truthTim Peters2001-09-301-0/+7
| | | | | it acts more like assigning to keys in locals(), i.e. modifications to function locals aren't reflected in the locals when execfile() returns.
* Correct docs for long(float).Tim Peters2001-09-301-2/+1
|