- 26 Sep, 2001 2 commits
-
-
Barry Warsaw authored
-
Barry Warsaw authored
Fred prefers. I'm not sure I like this organization, so it may change.
-
- 25 Sep, 2001 25 commits
-
-
Tim Peters authored
Rather than add umpteen new obscure internal Iter types, got rid of all of them. See the new comment.
-
Barry Warsaw authored
iterator, just test to make sure it has the two required iterator protocol methods __iter__() and next() -- actually just test hasattr-ness.
-
Guido van Rossum authored
their 'i' and 'r' variants) were not being generated if the corresponding nb_ slots were present in the type object. I bet this is because floor and true division were introduced after I last looked at that part of the code.
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
use it. This simplifies the individual tests a little. Added some new tests related to exception handling.
-
Tim Peters authored
the local save/modify/restore of sys.stdout, but add machinery so that regrtest can tell test_support the value of sys.stdout at the time regrtest.main() started, and test_support can pass that out later to anyone who needs a "visible" stdout.
-
Guido van Rossum authored
__class__. The __new__ protocol is up to this. (Thanks to Tim for pointing this out.)
-
Tim Peters authored
-
Tim Peters authored
favor of local save/modify/restore. The test suite should run fine again.
-
Fred Drake authored
This closes SF bug #448918.
-
Fred Drake authored
-
Fred Drake authored
the object has been pickled; don't mutate the instance dict in the __getstate__() method. Other minor changes for style. Broke up the displayed interactive session to get better page-breaking behavior for typeset versions, and to point out an important aspect of the example. This closes SF bug #453914.
-
Guido van Rossum authored
- Made cls.__module__ writable. - Ensure that obj.__dict__ is returned as {}, not None, even upon first reference; it simply springs into life when you ask for it. (*) The pickling support is provisional for the following reasons: - It doesn't support classes with __slots__. - It relies on additional support in copy_reg.py: the C method __reduce__, defined in the object class, really calls calling copy_reg._reduce(obj). Eventually the Python code in copy_reg.py needs to be migrated to C, but I'd like to experiment with the Python implementation first. The _reduce() code also relies on an additional helper function, _reconstructor(), defined in copy_reg.py; this should also be reimplemented in C.
-
Guido van Rossum authored
standalone.
-
Fred Drake authored
This closes SF patch #461337.
-
Fred Drake authored
Cleaned up a bunch of XXX comments containing links to additional information, replacing them with proper references. Replaced "MacOS" with "Mac OS", since that's what the style guide says.
-
Guido van Rossum authored
Also did some whitespace normalization.
-
Tim Peters authored
property() (get, set, del; not set, get, del). + Change "Data defined/inherited in ..." header lines to "Data and non-method functions defined/inherited in ...". Things like the value of __class__, and __new__, and class vrbls like the i in class C: i = int show up in this section too. I don't think it's worth a separate section to distinguish them from non-callable attrs, and there's no obvious reliable way to distinguish callable from non-callable attrs anyway.
-
Guido van Rossum authored
-
Guido van Rossum authored
Add news items about comparisons, repr(), __class__ assignment.
-
Guido van Rossum authored
than <type 'ClassName'>. Exception: if it's a built-in type or an extension type, continue to call it <type 'ClassName>. Call me a wimp, but I don't want to break more user code than necessary.
-
Guido van Rossum authored
same. I hope the test for structural equivalence is stringent enough. It only allows the assignment if the old and new types: - have the same basic size - have the same item size - have the same dict offset - have the same weaklist offset - have the same GC flag bit - have a common base that is the same except for maybe the dict and weaklist (which may have been added separately at the same offsets in both types)
-
Tim Peters authored
always been close to useless, because the <small>-ified docstrings were too small to read, even after cranking up my default font size just for pydoc. Now it reads fine under my defaults (as does most of the web <0.5 wink>). If it's thought important to play tricks with font size, tough, then someone should rework pydoc to use style sheets, and (more) predictable percentage-of-default size controls. + Tried to ensure that all <dt> and <dd> tags are closed. I've read (but don't know) that some browsers get confused if they're not, and esp. when style sheets are in use too.
-
Tim Peters authored
than text mode, since here we can hyperlink from the getter etc methods back to their definitions.
-
- 24 Sep, 2001 13 commits
-
-
Tim Peters authored
properties: the docstring (if any) is displayed, and the getter, setter and deleter (if any) functions are named. All that is shown indented after the property name. + Text-mode pydoc class display now draws a horizontal line between class attribute groups (similar to GUI mode -- while visually more intrusive in text mode, it's still an improvement).
-
Tim Peters authored
- property() now takes 4 keyword arguments: fget, fset, fdel, doc. Note that the real purpose of the 'f' prefix is to make fdel fit in ('del' is a keyword, so can't used as a keyword argument name). - These map to visible readonly attributes 'fget', 'fset', 'fdel', and '__doc__' in the property object. - fget/fset/fdel weren't discoverable from Python before. - __doc__ is new, and allows to associate a docstring with a property.
-
Fred Drake authored
declarations and weird markup that we used to accept & ignore that recent versions raised an exception for; the original behavior has been restored and augmented (the user can decide what to do if they care; the default is to ignore it as done in early versions).
-
Fred Drake authored
-
Fred Drake authored
Use a new internal method, error(), consistently to raise parse errors; the new base class also uses this. Adjust the parse_comment() method to return the new offset into the buffer instead of the number of characters scanned; this was the only helper method that did it this way, so we have better consistency now. Required to share the new base class. This fixes SF bug #448482 and #453706.
-
Fred Drake authored
Use a new internal method, error(), consistently to raise parse errors; the new base class also uses this.
-
Fred Drake authored
-
Fred Drake authored
and HTMLParser modules (and indirectly for the htmllib.HTMLParser class). This has all the support for scanning over DOCTYPE declarations; it warrants having a base class since this is a fair amount of tedious code (since it's fairly strict), and should be in a separate module to avoid compiling many REs that are not used (which would happen if this were placed in either then sgmllib or HTMLParser module).
-
Thomas Wouters authored
popped frame-block. What an embarrassing bug! Especially for Jeremy, since he accepted the patch :-) This fixes SF bugs #463359 and #462937, and possibly other, *very* obscure bugs with very deeply nested loops that continue the loop and then break out of it or raise an exception.
-
Guido van Rossum authored
to one with a static metatype raised an obscure error.
-
Fred Drake authored
and the information provided to the profiler. This stuff is a mess!
-
Guido van Rossum authored
function returns NotImplemented when comparing objects whose tp_richcompare slot is not itself.
-
Marc-André Lemburg authored
input to .write() too.
-