- 25 Sep, 2001 11 commits
-
-
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 24 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.
-
Just van Rossum authored
this week (apparently me and Bob Heeter at more or less the same time).
-
Martin v. Löwis authored
-
Guido van Rossum authored
arguments are subclasses of str, as long as they don't override rich comparison.
-
Guido van Rossum authored
looks like <X object at ...>, sometimes it says <X instance at ...>. Make this uniformly say <X object at ...>.
-
Fred Drake authored
introduced in Python 2.2. Add documentation for the slice object interface (not complete). Added version annotations for several of the Python 2.2 APIs already documented.
-
Fred Drake authored
-
Andrew M. Kuchling authored
Fix two errors
-
Steven M. Gava authored
-
Tim Peters authored
+ Minor code cleanup, generalization and simplification. + "Do something" to make the attribute aggregation more apparent: - In text mode, stick a "* " at the front of subgroup header lines. - In GUI mode, display a horizontal rule between subgroups. For GUI mode, this is a huge improvement, at least under IE.
-
Tim Peters authored
mode (identify the source class for class attrs; segregate attrs according to source class, and whether class method, static method, property, plain method, or data; display data attrs; display docstrings for data attrs when possible). Alas, this is mondo ugly, and I'm no HTML guy. Part of the problem is that pydoc's GUI mode has always been ugly under IE, largely because <small> under IE renders docstrings unreadably small (while sometimes non-docstring text is painfully large). Another part is that these segregated listings of attrs would *probably* look much better as bulleted lists. Alas, when I tried that, the bullets all ended up on lines by themselves, before the method names; this is apparently because pydoc (ab?)uses definition lists for format effects, and at least under IE if a definition list is the first chunk of a list item, it gets rendered on a line after the <li> bullet. An HTML wizard would certainly be welcomed here.
-
Barry Warsaw authored
-
- 23 Sep, 2001 5 commits
-
-
Tim Peters authored
This almost entirely replaces how pydoc pumps out class docs, but only in text mode (like help(whatever) from a Python shell), not in GUI mode. A class C's attrs are now grouped by the class in which they're defined, attrs defined by C first, then inherited attrs grouped by alphabetic order of the defining classes' names. Within each of those groups, the attrs are subgrouped according to whether they're plain methods, class methods, static methods, properties, or data. Note that pydoc never dumped class data attrs before. If a class data attr is implemented via a data descriptor, the data docstring (if any) is also displayed (e.g., file.softspace). Within a subgroup, the attrs are listed alphabetically. This is a friggin' mess, and there are bound to be glitches. Please beat on it and complain! Here are three glitches: 1. __new__ gets classifed as 'data', for some reason. This will have to get fixed in inspect.py, but since the latter is already looking for any clue that something is a method, pydoc will almost certainly not know what to do with it when its classification changes. 2. properties are special-cased to death. Unlike any other kind of function or method, they don't have a __name__ attr, so none of pydoc's usual code can deal with them. Worse, the getter and setter and del'er methods associated with a property don't appear to be discoverable from Python, so there's really nothing I can think of to do here beyond just listing their names. Note that a property can't be given a docstring, either (or at least I've been unable to sneak one in) -- perhaps the property() constructor could take an optional doc argument? 3. In a nested-scopes world, pydoc still doesn't know anything about nesting, so e.g. classes nested in functions are effectively invisible.
-
Martin v. Löwis authored
-
Tim Peters authored
Create & populate the new Lib/test/data directory.
-
Tim Peters authored
-
Barry Warsaw authored
suite. Note that other tests can put input data in this directory.
-