 |
DESCRIPTION
Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java.
Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. It is also usable as an extension language for applications that need a programmable interface.
WHAT'S NEW
Version 3.1.1:
Core and Builtins
- Issue #6707: dir() on an uninitialized module caused a crash.
- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
- Issue #6573: set.union() stopped processing inputs if an instance of self occurred in the argument chain.
- Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set.
- Issue #6428: Since Python 3.0, the __bool__ method must return a bool object, and not an int. Fix the corresponding error message, and the documentation.
- Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform.
- Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the 'surrogateescape' error handler, a string which contains unpaired surrogates.
C-API
- Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string.
- Issue #6405: Remove duplicate type declarations in descrobject.h.
- The code flags for old __future__ features are now available again.
Library
- Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT DO/DONT correctly.
- Issue #6126: Fixed pdb command-line usage.
- Issue #6629: Fix a data corruption issue in the new I/O library, which could occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or "wb+" mode) after having buffered a certain amount of data for reading. This bug was not present in the pure Python implementation.
- Issue #6622: Fix "local variable 'secret' referenced before assignment" bug in POP3.apop.
- Issue #6637: defaultdict.copy() did not work when the default factory was left unspecified. Also, the eval/repr round-trip would fail when the default_factory was None.
- Issue #2715: Remove remnants of Carbon.File from binhex module.
- Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal digits in input, as recommended by the standard. Previously it was restricted to accepting [0-9].
- Issues #5155, #5313, #5331: multiprocessing.Process._bootstrap was unconditionally calling "os.close(sys.stdin.fileno())" resulting in file descriptor errors
- Issue #1424152: Fix for http.client, urllib.request to support SSL while working through proxy. Original patch by Christopher Li, changes made by Senthil Kumaran
- importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like the documentation said it did even though the code in PyLoader relied on the abstract method required by ResourceLoader.
- Issue #6431: Make Fraction type return NotImplemented when it doesn't know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float.
- Issue #6415: Fixed warnings.warn segfault on bad formatted string.
- Issue #6358: The exit status of a command started with os.popen() was reported differently than it did with python 2.x.
- Issue #6323: The pdb debugger did not exit when running a script with a syntax error.
- Issue #3392: The subprocess communicate() method no longer fails in select() when file descriptors are large; communicate() now uses poll() when possible.
- Issue #6369: Fix an RLE decompression bug in the binhex module.
- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.
- Issue #4005: Fixed a crash of pydoc when there was a zip file present in sys.path.
Extension Modules
- Fix a segfault in expat.
- Issue #4509: array.array objects are no longer modified after an operation failing due to the resize restriction in-place when the object has exported buffers.
Build
- Issue 4601: 'make install' did not set the appropriate permissions on directories.
- Issue 5390: Add uninstall icon independent of whether file extensions are installed.
Test
- Fix a test in importlib.test.source.test_abc_loader that was incorrectly testing when a .pyc file lacked an code object bytecode.
REQUIREMENTS
Mac OS X 10.3.9 or later.
|
|
|
 |
|  |
 | |  |
| Python User Reviews (2 posts) | Write A Review |
 | Apr 2 2006 |
MILLENNIUMX "One of the worst "features" of Python is that indentation is part of the syntax." So, do you indent your code in other languages? Of course you do; it's one of the first things any decent programmer learns to do. Given that, what's the problem? All it does is help keep the code readable. (Version 2.4.3) | |
| [ 3 Replies - Reply ] | |
Replies:
 | Feb 18 2008 |
TUISHIMI That whole "indentation" claim used AGAINST Python really irks me. It is one of the best features of one of the most easy-to-learn languages available. I agree with your comments. (Version 2.5.2rc1) | |
 | Feb 28 2009 |
WRELEVEN Since most developers already indent in a compatible way it's not the main issue. I know I felt weird about losing the { and } brackets though. They were like visual safety belts. I'm comfortable with Python now, I'm happen to trade them in for a better language. (Version 3.0.1) | |
 | Mar 3 2010 |
SURFSPIRIT Completely agree, I hate python because of that!!! (Version 3.1.1) | |
 | Apr 2 2005 |
ANONYMOUS Best language ever! I was in an, umm, less than sober state of mind last night and decided I needed a script to change a list of URLs into a list of HTML links. It worked perfectly the first time. I can't think of another language I could have done it in that would have worked as well. If you have any interest in programming whatsoever, learn python. You'll be a better programmer in any language because of it. (Version 2.4.1) | |
| [ 5 Replies - Reply ] | |
Replies:
 | Sep 24 2005 |
ANONYMOUS Ruby. (Version 2.4.2rc1) | |
 | Sep 24 2005 |
TED Ruby is definitely #2, but suffers from it's cryptic Perl-like syntax which does nothing but reduce legibility. (Version 2.4.2rc1) | |
 | Sep 29 2005 |
ANONYMOUS "Be a better programmer ..." WRONG! One of the worst "features" of Python is that indentation is part of the syntax. Bah! Learn a lower level language so you understand what happens under the hood, and then tackle an OO language. If I need to change a list URLs into a list of HTML links I'll use a quick sed script, thank you. (Version 2.4.2) | |
 | Jun 22 2006 |
MARK EVERITT The enforced syntax debate is well known and argued elsewhere, in forums specifically for arguments such as this. The result is that you get people who do like it, and people who don't. I learnt C first myself, but when it comes to rapid prototyping, and scripting, python is excellent. I use it as a replacement for Matlab, and it performs very well indeed. For learner programmers, python is great to teach syntax of course. An alternative starting language such as C gives you more of an idea about how machines work, but this can be extremely intimidating for those just starting out. Posting about learning a language on here is perhaps moot, due to the MacPython 2.3 installation present by default which is fine for begginers programming. A new user certainly shouldn't start with beta software. (Version 2.5b1) | |
 | Nov 8 2008 |
ASMEURER I probably would have used regular expressions in a text editor to do that. (Version 2.6) | |
|
| |
|