| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
attribute changed again.
|
|
|
|
|
|
| |
libraries. This is done by adding a .get_source_files() method,
contributed by Rene Liebscher and slightly modified.
Remove an unused local variable spotted by PyChecker
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use construction-syntax for an exception to make the argument easier
to read.
|
| |
|
|
|
|
|
|
|
| |
though 'licence' is still supported for backward-compatibility
(Should I add a warning to get_licence(), or not bother?)
Also fixes an UnboundLocalError noticed by PyChecker
|
|
|
|
|
| |
available in java, so only use the advanced flush options if they
are defined in the zlib module.
|
|
|
|
|
|
| |
bug #449000, "re.sub(r'\n', ...) broke". This was Fredrik's
suggestion -- he's on vacation and said he wouldn't be able to work on
this until next week.
|
| |
|
|
|
|
|
| |
Wrap some long lines.
Remove unnecessary tuple unpack.
|
| |
|
| |
|
| |
|
|
|
|
| |
"import MacOS", and there *is* a need for "import operator".
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
uninstantiable. All is well now.
|
|
|
|
| |
repr(type(x)).
|
| |
|
|
|
|
| |
Look specific to Windows. Don't know whether it works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For local files urllib.py doesn't return the MIME
headers that the documentation says it does:
http://www.python.org/doc/current/lib/module-
urllib.html#l2h-2187 states that "When the method is
local-file, returned headers will include a Date
representing the file's last-modified time, a Content-
Length giving file size, and a Content-Type containing
a guess at the file's type"
But in Python 2.1 the only header that gets returned
is the Content-Type:
>>> import urllib
>>> f = urllib.urlopen("gurk.txt")
>>> f.info().headers
['Content-Type: text/plain\n']
|
|
|
|
| |
string.join() on each invocation of _bind.
|
|
|
|
|
|
|
|
|
| |
Python's logolike module turtle.py did not display
the turtle except when actually drawing lines.
This patch changes the turtle.py module so that
it displays the turtle at all times when tracing is
on. This is similar to the the way that logo works.
When tracing is off the turtle will not be displayed.
|
| |
|
| |
|
| |
|
|
|
|
| |
class.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
If 'unittest.py' was run from the command line with the name of a test
case class as a parameter, it failed with an ugly error. (Which was a
shame, because the documentation says you can do that.)
The problem was the old 'is the class X that you imported from me the same
as my class X?' gotcha.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces:
- A new operator // that means floor division (the kind of division
where 1/2 is 0).
- The "future division" statement ("from __future__ import division)
which changes the meaning of the / operator to implement "true
division" (where 1/2 is 0.5).
- New overloadable operators __truediv__ and __floordiv__.
- New slots in the PyNumberMethods struct for true and floor division,
new abstract APIs for them, new opcodes, and so on.
I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.
Not yet implemented are warnings (default off) when / is used with int
or long arguments.
This has been on display since 7/31 as SF patch #443474.
Flames to /dev/null.
|
| |
|
|
|
|
|
|
|
|
|
| |
Also fix another bug caught by pychecker-- HTTPError() raised when
redirect limit exceed did not pass an fp object. Had to change method
to keep fp object around until it's certain that the error won't be
raised.
Remove useless line in do_proxy().
|
|
|
|
|
| |
#427345. These are supposed to support binary data and avoid
buffering problems on Windows.
|
|
|
|
|
|
|
| |
are now allowed by ok_builtin_modules. This effectively backs out
revision 1.26.
This closes SF bug #448546.
|
|
|
|
|
|
| |
when quoting attribute values that contain single & double quotes.
This provides the rest of the regression test for SF bug #440351.
|
|
|
|
|
|
|
| |
attribute values. Just using escape() can (and always has) led to broken
XML being generated. This makes sure it always produces the right thing.
This actually closes SF bug #440351.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
break old code (in extreme cases). See SF bug #448153.
Add a new subclass IterableUserDict that has the __iter__ method.
Note that for new projects, unless backwards compatibility with
pre-2.2 Python is required, subclassing 'dictionary' is recommended;
UserDict might become deprecated.
|
|
|
|
|
|
|
|
|
| |
__all__, to indicate these are implied as part of the public API.
IDLE's "Check Module" command uses this, and it broke once already
because the reset_globals() and tokeneater() functions were deleted
when Neil converted this to using the generator API of tokenizer.
(See SF bug #448835.)
|
|
|
|
|
| |
instantiated. (Its use as a base class is adequately tested by other
tests.)
|
| |
|