- 04 Eyl, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
of PyMapping_Keys because we know we have a real dict. Tolerate that objects may have an attr named "__dict__" that's not a dict (Py_None popped up during testing). test_descr.py, test_dir(): Test the new classic-class behavior; beef up the new-style class test similarly. test_pyclbr.py, checkModule(): dir(C) is no longer a synonym for C.__dict__.keys() when C is a classic class (looks like the same thing that burned distutils! -- should it be *made* a synoym again? Then it would be inconsistent with new-style class behavior.).
-
- 03 Eyl, 2001 6 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
Neil Schemenauer yazdı
disabled. Obviously everyone enables the GC. :-)
-
Tim Peters yazdı
-
Tim Peters yazdı
integer types, and y must be >= 0. See discussion at http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
-
Tim Peters yazdı
bag. It's clearly wrong for classic classes, at heart because a classic class doesn't have a __class__ attribute, and I'm unclear on whether that's feature or bug. I'll repair this once I find out (in the meantime, dir() applied to classic classes won't find the base classes, while dir() applied to a classic-class instance *will* find the base classes but not *their* base classes). Please give the new dir() a try and see whether you love it or hate it. The new dir([]) behavior is something I could come to love. Here's something to hate: >>> class C: ... pass ... >>> c = C() >>> dir(c) ['__doc__', '__module__'] >>> The idea that an instance has a __doc__ attribute is jarring (of course it's really c.__class__.__doc__ == C.__doc__; likewise for __module__). OTOH, the code already has too many special cases, and dir(x) doesn't have a compelling or clear purpose when x isn't a module.
-
Tim Peters yazdı
-
- 02 Eyl, 2001 16 kayıt (commit)
-
-
Tim Peters yazdı
-
Tim Peters yazdı
-
Jack Jansen yazdı
Tested, too:-)
-
Guido van Rossum yazdı
treated the same as single ones by default. Added -m option to issue a warning for this case instead.
-
Guido van Rossum yazdı
-
Tim Peters yazdı
mapping object", in the same sense dict.update(x) requires of x (that x has a keys() method and a getitem). Questionable: The other type constructors accept a keyword argument, so I did that here too (e.g., dictionary(mapping={1:2}) works). But type_call doesn't pass the keyword args to the tp_new slot (it passes NULL), it only passes them to the tp_init slot, so getting at them required adding a tp_init slot to dicts. Looks like that makes the normal case (i.e., no args at all) a little slower (the time it takes to call dict.tp_init and have it figure out there's nothing to do).
-
Tim Peters yazdı
-
Tim Peters yazdı
-
Fred Drake yazdı
right thing with page breaks in long examples, while the verbatim environment does not. This causes the example to wrap to the next page instead of overwriting the page footer and bottom margin.
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
percolated out, and some general cleanup. The output is still the same, except it now prints "Index: <file>" instead of "Processing: <file>", so that the output can be used as input for patch (but only the diff-style parts of it).
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
-
Tim Peters yazdı
Stephen Hansen reported via email that he didn't finish the port to Borland C, so remove the old item saying it worked and add a new item saying what I know; I've asked Stephen for more details.
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
- 01 Eyl, 2001 11 kayıt (commit)
-
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
Jack Jansen yazdı
Moved the declarations to pymactoolbox.h.
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
Jack Jansen yazdı
and accepting unix-style newlines on input. Also (finally) added a startup option to get -vv behaviour. Moved __convert_to_newlines to main.c because that's easier with the newline option.
-
Jack Jansen yazdı
and accepting unix-style newlines on input.
-
Guido van Rossum yazdı
to be change to //. The code is pretty gross so far, and I promise I'll work on this more, but I have to go eat now! :-)
-
Guido van Rossum yazdı
doesn't have it.) This is from SF bug #457487 by anonymous.
-
Fred Drake yazdı
This closes SF bug #457100.
-
- 31 Agu, 2001 6 kayıt (commit)
-
-
Guido van Rossum yazdı
Michael Hudson's.
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
substitute "<string>" for the module name in that case. This actually occurred when running test_descr.py with -Dwarn.
-
Guido van Rossum yazdı
PEP 238. Changes: - add a new flag variable Py_DivisionWarningFlag, declared in pydebug.h, defined in object.c, set in main.c, and used in {int,long,float,complex}object.c. When this flag is set, the classic division operator issues a DeprecationWarning message. - add a new API PyRun_SimpleStringFlags() to match PyRun_SimpleString(). The main() function calls this so that commands run with -c can also benefit from -Dnew. - While I was at it, I changed the usage message in main() somewhat: alphabetized the options, split it in *four* parts to fit in under 512 bytes (not that I still believe this is necessary -- doc strings elsewhere are much longer), and perhaps most visibly, don't display the full list of options on each command line error. Instead, the full list is only displayed when -h is used, and otherwise a brief reminder of -h is displayed. When -h is used, write to stdout so that you can do `python -h | more'. Notes: - I don't want to use the -W option to control whether the classic division warning is issued or not, because the machinery to decide whether to display the warning or not is very expensive (it involves calling into the warnings.py module). You can use -Werror to turn the warnings into exceptions though. - The -Dnew option doesn't select future division for all of the program -- only for the __main__ module. I don't know if I'll ever change this -- it would require changes to the .pyc file magic number to do it right, and a more global notion of compiler flags. - You can usefully combine -Dwarn and -Dnew: this gives the __main__ module new division, and warns about classic division everywhere else.
-
Guido van Rossum yazdı
xxx_subtype_new() functions are OK, but I goofed up in this one. :-( )
-
Guido van Rossum yazdı
-