[RELEASED] Python 2.7.5

2013-05-15 Thread Benjamin Peterson
in 2.7.4.) This is a production release. Happy May, Benjamin Peterson 2.7 Release Manager (on behalf of all of Python 2.7's contributors) -- http://mail.python.org/mailman/listinfo/python-list

Re: Py 3.3, unicode / upper()

2012-12-19 Thread Benjamin Peterson
gmail.com> writes: > I really, really do not know what I should think about that. > (It is a complex subject.) And the real question is why? Because that's what the Unicode spec says to do. -- http://mail.python.org/mailman/listinfo/python-list

[RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-25 Thread Benjamin Peterson
/ With regards, The Python release team Barry Warsaw (2.6), Georg Brandl (3.2), Benjamin Peterson (2.7 and 3.1) [1] http://www.ocert.org/advisories/ocert-2011-003.html [2] http://bugs.python.org/issue13703 -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-02-27 Thread Benjamin Peterson
Ben Finney benfinney.id.au> writes: > > Putting “RELEASED” in the subject, when they're not released and are > instead *candidates for* release, is confusing and muddies the issue of > what you even mean by “release”. > {alpha, beta, release candidate, final} \subsetof releases -- http://mai

Re: sys.stdout.detach() results in ValueError

2012-03-07 Thread Benjamin Peterson
Peter Kleiweg xs4all.nl> writes: > Not yet using fp in any way, this script gives the following error: > > Exception ValueError: 'underlying buffer has been detached' in You're probably using print() or some such which tries to write to sys.stdout. It's safest to just write to sys.stdout.buf

[RELEASED] Second release candidates for Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-03-18 Thread Benjamin Peterson
ses/3.1.5/ http://python.org/download/releases/3.2.3/ Please test these candidates and report bugs to http://bugs.python.org/ With regards, The Python release team Barry Warsaw (2.6), Georg Brandl (3.2), Benjamin Peterson (2.7 and 3.1) [1] http://www.ocert.org/advisories/ocert-2011-003.h

[RELEASED] Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-04-11 Thread Benjamin Peterson
3.2.3/ As always, please report bugs to http://bugs.python.org/ Happy-to-put-hash-attack-issues-behind-them-ly yours, The Python release team Barry Warsaw (2.6), Georg Brandl (3.2), and Benjamin Peterson (2.7 and 3.1) [1] http://www.ocert.org/advisories/ocert-2011-003.html [2] ht

[RELEASE] Python 2.7.2

2011-06-12 Thread Benjamin Peterson
those in the northern hemisphere, have a nice summer! -- Benjamin Peterson Release Manager benjamin at python.org (on behalf of the entire python-dev team and 2.7.2's contributors) -- http://mail.python.org/mailman/listinfo/python-list

[RELEASED] Python 3.1.4

2011-06-12 Thread Benjamin Peterson
s can always be reported to: http://bugs.python.org Enjoy and be merry! -- Benjamin Peterson Release Manager benjamin at python.org (on behalf of the entire python-dev team and 3.1.4's contributors) -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] [RELEASED] Python 3.1.4

2011-06-12 Thread Benjamin Peterson
2011/6/12 Paul Moore : > On 12 June 2011 18:58, Benjamin Peterson wrote: >> On behalf of the Python development team, I'm sanguine to announce a release >> candidate for the fourth bugfix release for the Python 3.1 series, Python >> 3.1.4. > > Is this actually a R

Re: 'super' object has no attribute '__setitem__'

2011-08-18 Thread Benjamin Peterson
luvspython gmail.com> writes: > def __setitem__(self, item, value): > super(HistoryKeeper, self).__setitem__(item, value) object has no __setitem__. Are you looking for __setattr__? > > class Vehicle(HistoryKeeper): > def __init__(self, tag, make, model): > args = locals

Re: Guido rethinking removal of cmp from sort method

2011-04-01 Thread Benjamin Peterson
Paul Rubin nospam.invalid> writes: > > I actually think Python3 actually didn't go far enough in fixing > Python2. I'd have frankly preferred delaying it by a few years, to > allow PyPy to come to maturity and serve as the new main Python > implementation, and have that drive the language change

[RELEASE] 3.1.4 release candidate 1

2011-05-29 Thread Benjamin Peterson
ed to: http://bugs.python.org Enjoy! -- Benjamin Peterson Release Manager benjamin at python.org (on behalf of the entire python-dev team and 3.1.4's contributors) -- http://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.2 release candidate 1

2011-05-29 Thread Benjamin Peterson
major problems, 2.7.2 will be released in two weeks. Please report any bugs you find to http://bugs.python.org/ Enjoy! -- Benjamin Peterson Release Manager benjamin at python.org (on behalf of the entire python-dev team and 2.7.2's contributors) -- http://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.14

2017-09-16 Thread Benjamin Peterson
I'm happy to announce to the immediate availability of Python 2.7.14, yet another bug fix release in the Python 2.7 series. 2.7.14 includes 9 months of conservative bug fixes from the 3.x branch. Downloads of source code and binaries are at: https://www.python.org/downloads/release/python-2714

[RELEASE] Python 2.7.13 release candidate 1

2016-12-03 Thread Benjamin Peterson
It is my pleasure to announce the first release candidate of Python 2.7.13, a new bugfix release in the Python 2.7x series. Downloads may be found on python.org: https://www.python.org/downloads/release/python-2713rc1/ Please test the release and report any bugs to https://bugs.python.or

[RELEASE] Python 2.7.13

2016-12-17 Thread Benjamin Peterson
: https://bugs.python.org/ 2.7.14 will appear mid-2017. All the best in the new year, Benjamin Peterson 2.7 release manager -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.15 release candidate 1

2018-04-14 Thread Benjamin Peterson
I'm pleased to announce the immediate availability of Python 2.7.15 release candidate 1. Python 2.7.15rc1 is a preview release of the next bug fix release in the Python 2.7.x series. Python 2.7.15rc1 may be downloaded in source and binary forms from https://www.python.org/downloads/release/p

[RELEASE] Python 2.7.15

2018-04-30 Thread Benjamin Peterson
Greetings, I'm pleased to announce the immediate availability of Python 2.7.15, the latest bug fix release in the senescent Python 2.7 series. Source and binary downloads may be found on python.org: https://www.python.org/downloads/release/python-2715/ Bugs should be reported to https://bu

[RELEASE] Python 2.7.12 release candidate 1

2016-06-12 Thread Benjamin Peterson
Python 2.7.12 release candidate 1 is now available for download. This is a preview release of the next bugfix release in the Python 2.7.x series. Assuming no horrible regressions are located, a final release will follow in two weeks. Downloads for 2.7.12rc1 can be found python.org: https://www

[RELEASE] Python 2.7.12

2016-06-27 Thread Benjamin Peterson
It is my privilege to present you with another release in the Python 2.7 series, Python 2.7.12. Since the release candidate, there were two changes: - The Windows binaries have been changed to use OpenSSL 1.0.2h. - The "about" dialog in IDLE was fixed. Downloads, as always, are on python.org:

[RELEASE] Python 2.7.16 release candidate 1

2019-02-16 Thread Benjamin Peterson
I'm pleased to announce the immediate availability of Python 2.7.16 release candidate 1. This is a prerelease for yet another bug fix release in the Python 2.7.x series. It includes over 100 fixes over Python 2.7.15. See the changelog at https://raw.githubusercontent.com/python/cpython/baa

[RELEASE] Python 2.7.16

2019-03-03 Thread Benjamin Peterson
Hello all, I'm pleased to announce the immediate availability of Python 2.7.16 for download at https://www.python.org/downloads/release/python-2716/. The only change since the release candidate was a fix for the IDLE icon on macOS. See https://bugs.python.org/issue32129. Refer to the changelog f

[RELEASE] Python 2.7.17 release candidate 1

2019-10-08 Thread Benjamin Peterson
The first release candidate of Python 2.7.17 is now available for download and testing. Python 2.7.17 includes 80 fixes over Python 2.7.16. Downloads may be found on python.org: https://www.python.org/downloads/release/python-2717rc1/ Read the full changelog at: https://raw.githubuser

[RELEASE] Python 2.7.17

2019-10-19 Thread Benjamin Peterson
Greetings, I'm wealful to announce the immediate availability of Python 2.7.17, another bugfix release in the Python 2.7 series. Downloads are on python.org: https://www.python.org/downloads/release/python-2717/ No code changes occurred between the 2.7.17 release candidate and the final re

[RELEASE] Python 2.7.18 release candidate 1

2020-04-06 Thread Benjamin Peterson
Greetings, 2.7.18 release candidate 1, a testing release for the last release of the Python 2.7 series, is now available for download. The CPython core developers stopped applying routine bugfixes to the 2.7 branch on January 1. 2.7.18 will includes fixes that were made between the release of 2.

[RELEASE] Python 2.7.18, the end of an era

2020-04-20 Thread Benjamin Peterson
I'm eudaemonic to announce the immediate availability of Python 2.7.18. Python 2.7.18 is a special release. I refer, of course, to the fact that "2.7.18" is the closest any Python version number will ever approximate e, Euler's number. Simply exquisite! A less transcendent property of Python 2.

[RELEASED] Python 2.7.11

2015-12-05 Thread Benjamin Peterson
Python 2.7.11, the latest bugfix release of the Python 2.7 series, is now available for download at https://www.python.org/downloads/release/python-2711/ Thank you as always to Steve Dower and Ned Deily, who build our binaries. Enjoy the rest of the year, Benjamin -- https://mail.python.org/

[RELEASE] Python 2.7.9 release candidate 1

2014-11-26 Thread Benjamin Peterson
I'm pleased to announce the first release candidate of Python 2.7.9, which will be the next bugfix release in the Python 2.7 series. Despite technically being a maintenance release, Python 2.7.9 will include several majors changes from 2.7.8: - The "ensurepip" module has been backported to Python 2

[RELEASE] Python 2.7.9

2014-12-10 Thread Benjamin Peterson
It is my pleasure to announce the release of Python 2.7.9, a new bugfix release in the Python 2.7 series. Despite technically being a maintenance release, Python 2.7.9 includes several majors changes from 2.7.8: - The "ensurepip" module has been backported to Python 2.7 - Python 3's ssl module has

[RELEASED] Python 2.7.7 release candidate 1

2014-05-18 Thread Benjamin Peterson
sting release. Assuming no horrible bugs are found, 2.7.7 final will be released in two weeks time. Please consider testing your applications and libraries with the release candidate and reporting bugs to http://bugs.python.org/ Enjoy, Benjamin Peterson 2.7 Release Manager [1] http://bugs.pytho

[RELEASE] Python 2.7.7

2014-06-01 Thread Benjamin Peterson
s the implementation of PEP 466, Network Security Enhancements for Python 2.7.x. Downloads are at https://python.org/download/releases/2.7.7/ This is a production release. As always, please report bugs to http://bugs.python.org/ Build great things, Benjamin Peterson 2.7 Release Manage

[RELEASE] Python 2.7.6 release candidate 1

2013-10-27 Thread Benjamin Peterson
final release will follow in a week. Enjoy, Benjamin Peterson 2.7 Release Manager -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.6

2013-11-10 Thread Benjamin Peterson
/ As always, report bugs to http://bugs.python.org/ Have a nice November, Benjamin Peterson 2.7 Release Manager [1] http://bugs.python.org/issue19435 -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] [RELEASE] Python 2.7.6

2013-11-10 Thread Benjamin Peterson
2013/11/10 Victor Stinner : > 2013/11/10 Benjamin Peterson : >> All the changes in Python 2.7.6 are described in full detail in the Misc/NEWS >> file of the source tarball. You can also view online at >> >> http://hg.python.org/cpython/raw-file/99d03261c1ba/Misc/

[RELEASE] Python 2.7.10 release candidate 1

2015-05-11 Thread Benjamin Peterson
It is my privilege to announce the first release candidate of 2.7.10, the next bugfix release in the 2.7 series. Downloads are at https://www.python.org/downloads/release/python-2710rc1/ The full changelog is at https://hg.python.org/cpython/raw-file/80ccce248ba2/Misc/NEWS Please conside

[RELEASE] Python 2.7.10

2015-05-23 Thread Benjamin Peterson
The next bugfix release of the Python 2.7.x series, Python 2.7.10, has been released. The only interesting change since the release candidate is a fix for a regression in cookie parsing. Downloads are available at: https://www.python.org/downloads/release/python-2710/ Report bugs at: https://

[RELASE] Python 2.7.11 release candidate 1

2015-11-21 Thread Benjamin Peterson
bugs to https://bugs.python.org If no serious problems are found, 2.7.11 final will be released in two weeks. Regards, Benjamin Peterson (on behalf of Python 2.7.11's contributors) -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.8

2014-07-01 Thread Benjamin Peterson
http://bugs.python.org/ Till next time, Benjamin Peterson 2.7 Release Manager (on behalf of all of Python's contributors) [1] http://bugs.python.org/issue21652 [2] http://bugs.python.org/issue21831 [3] http://bugs.python.org/issue21766 [4] http://bugs.python.org/issue21672 --

Re: Trouble with internationalized path under windows

2012-01-22 Thread Benjamin Peterson
Jacob Hallén sotospeak.se> writes: > > I have a problem which ought to have an obvious solution, but I haven't found > one despite searching for many hours. The problem occurs on Windows. You may be running into the brokenness of the Python import system prior to 3.2. See http://bugs.python.or

[RELEASE] Python 2.7.4 release candidate 1

2013-03-24 Thread Benjamin Peterson
will occur in 2 weeks. Downloads are at http://python.org/download/releases/2.7.4/ As always, please report bugs to http://bugs.python.org/ Enjoy, Benjamin Peterson 2.7 Release Manager -- http://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 2.7.4

2013-04-06 Thread Benjamin Peterson
Best wishes, Benjamin Peterson 2.7 Release Manager (on behalf of all of Python 2.7's contributors) -- http://mail.python.org/mailman/listinfo/python-list

Re: what gives with

2009-01-22 Thread Benjamin Peterson
Darren Dale gmail.com> writes: > Judging from http://bugs.python.org/issue2400 , this issue > was fixed back in May 2008, but it is still present with python-2.5.4, > which was released in December. Why wont python-2.5 allow this kind of > import? Allowing that would be a new feature which is dis

Re: pep 8 constants

2009-01-22 Thread Benjamin Peterson
Benjamin Kaplan case.edu> writes: > > > On Thu, Jan 22, 2009 at 1:16 AM, Aahz pythoncraft.com> wrote:In article python.org>, > Brendan Miller catphive.net> wrote:>>PEP 8 doesn't mention anything about using all caps to indicate a constant.Now it does!  Seehttp://www.python.org/dev/peps/pep-0

Re: what gives with

2009-01-23 Thread Benjamin Peterson
Darren Dale gmail.com> writes: > I was talking about the behavior after doing "from __future__ import > absolute_import". I've been developing on python-2.6 using > absolute_import for weeks, knowing that I could do "from __future__ > import absolute import" on python-2.5. Now when I try to use >

Re: Stalled ticket in Python bug tracker

2009-01-23 Thread Benjamin Peterson
Steven D'Aprano REMOVE-THIS-cybersource.com.au> writes: > > I'm interested in this ticket in the bug tracker: > > http://bugs.python.org/issue2527 > > but it seems to have been stalled for nine months. Is there a procedure > for starting it up again? Should I ask about it on the python-dev ma

Re: strange error whilst porting to 2.6

2009-01-23 Thread Benjamin Peterson
Robin Becker NOSPAMreportlab.com> writes: > > python 2.6 indicates this error whilst running a script that works fine > under Python 2.5. > > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in ignored > > I suppose this must be related to some kind of isins

Re: strange error whilst porting to 2.6

2009-01-23 Thread Benjamin Peterson
Robin Becker NOSPAMreportlab.com> writes: > > > Well that's not really acceptable as a solution is it? :) This doesn't happen in Python 3.0, so you could port to that. :) In 2.7, the better recursion depth handling in Py3k may be backported,but the best you can do for now is not touch the recur

Re: Porting 3.0 to 2.6 - from __future__ import super missing?

2009-01-24 Thread Benjamin Peterson
andrew cooke acooke.org> writes: > > Hi, > > I have some 3.0 code, which I would like to make work with 2.6. > However, there does not seem to be support for the new super() (no > args) via __future__. Is that correct? If so, what's the best way to > handle this? Just use the two argument su

Re: Porting 3.0 to 2.6 - from __future__ import super missing?

2009-01-24 Thread Benjamin Peterson
andrew cooke acooke.org> writes: > Unfortunately, "metaclass=" is a syntax error in 2.6 so the following > still fails: > > from sys import version > > if version.startswith('2.'): > class Matcher(): > pass > else: > class Matcher(metaclass=ABCMeta): > pass I would sugge

Re: Can webbrowser module get source code?

2009-01-24 Thread Benjamin Peterson
Muddy Coder yahoo.com> writes: > I want to go > further: to get the source code of the webpage being displayed. Is it > possible to do it? I tried webbrow.get() but didn't work. Somebody can > help? Thanks! To do this, you actually need to fetch the page yourself: import urllib2 page_source = ur

Re: Possible to slice a string with unpacked tuple?

2009-01-24 Thread Benjamin Peterson
MRAB mrabarnett.plus.com> writes: > Does myString[myTuple[0] : myTuple[1]] count as unpacking? If it does, > then how about myString.__getslice__(*myTuple)? Please don't use special method names directly and especially not __getslice__(). It's deprecated and will be removed. -- http://mail.p

Re: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to

2009-01-29 Thread Benjamin Peterson
Anjanesh Lekshminarayanan anjanesh.net> writes: > > > It does auto-detect it as cp1252- look at the files in the traceback and > > you'll see lib\encodings\cp1252.py. Since cp1252 seems to be the wrong > > encoding, try opening it as utf-8 or latin1 and see if that fixes it. > > Thanks a lot !

Re: importlib: what is it, and why is it important?

2009-01-31 Thread Benjamin Peterson
excord80 gmail.com> writes: > > Regarding this blog post: http://sayspy.blogspot.com/2009/01/importlib-is-now-in-python-31.html Brett has made many other blog posts about his work on importlib. You might try examining those. > > So, could someone explain what importlib exactly is, and why thi

Re: MacPython 3.0 dmg installer?

2009-02-05 Thread Benjamin Peterson
Con gmail.com> writes: > > Hi, I was wondering, what's the status of the MacPython 3.0 installer > (.i.e. dmg file) ? I have been using the previous MacPython dmg > installers with great success without conflicting with other > installations on the system. There should be ones for 3.0.1 which

Re: Flattening lists

2009-02-05 Thread Benjamin Peterson
mk gmail.com> writes: > Hmm, I'm surprised by even that! Apparently list creation is more > expensive than I thought - it seems somewhat more expensive than the > cost of interpreting bytecode for "if var is None". Either list creation > is somewhat costly, or "if var is None" is really cheap.

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-07 Thread Benjamin Peterson
Terry gmail.com> writes: > On 2月7日, 下午7时10分, "Diez B. Roggisch" wrote: > > Do you by any chance have a few examples of these? There is a lot of > > idiomatic code in python to e.g. acquire and release the GIL or doing > > refcount-stuff. If that happens to be done with rather generic names as > >

Re: "Super()" confusion

2009-02-09 Thread Benjamin Peterson
Jean-Paul Calderone divmod.com> writes: > Consider whether you really need to use super(). > > http://fuhm.net/super-harmful/ This article chiefly deals with super()'s harm in multiple inteheritance situations. For the simple case, though, like that presented by the OP, I believe super() is perf

Re: "Super()" confusion

2009-02-10 Thread Benjamin Peterson
Marc 'BlackJack' Rintsch gmx.net> writes: > > On Tue, 10 Feb 2009 02:02:43 +, Benjamin Peterson wrote: > > > Jean-Paul Calderone divmod.com> writes: > >> Consider whether you really need to use super(). > >> > >> http://fuhm.n

Re: __import__ Confusion

2009-02-12 Thread Benjamin Peterson
gmail.com> writes: > > Can someone explain to me what's going on here? > > >>> __import__('some.package.module', {}, {}, []) > > >>> __import__('some.package.module', {}, {}, ['']) > As documented [1], unless fromlist is not empty, the first module is returned. Use the solution at the end o

Re: pdb in 3.0 very buggy (Win XP Home)

2009-02-13 Thread Benjamin Peterson
Aaron Brady gmail.com> writes: > > Hi, got a freeze when running 'pdb' in 3.0. This is a known issue because of the rewrite of the IO library in 3.0. It will hopefully be fixed in 3.1. See http://bugs.python.org/issue3618 for more information. -- http://mail.python.org/mailman/listinfo/pyt

Re: String concatenation performance with +=

2009-02-13 Thread Benjamin Peterson
Sammo gmail.com> writes: > > String concatenation has been optimized since 2.3, so using += should > be fairly fast. This is implementation dependent and shouldn't be relied upon. > > Note that I need to do something to mydata INSIDE the loop, so please > don't tell me to append moredata to a

Re: "Byte" type?

2009-02-15 Thread Benjamin Peterson
Steve Holden holdenweb.com> writes: > Beware, also, that in 2.6 the "bytes" type is essentially an ugly hack > to enable easier forward compatibility with the 3.X series ... It's not an ugly hack. It just isn't all that you might hope it'd live up to be. -- http://mail.python.org/mailman/list

Re: [Python-Dev] RELEASED Python 3.0.1

2009-02-16 Thread Benjamin Peterson
On Sun, Feb 15, 2009 at 9:15 PM, Ned Deily wrote: > > It would be great if someone could add OS X links for the 3.0.1 and > 2.6.1 to the main download page, too: > I've now added them to the main download page. -- Regards, Benjamin -- http://mail.python.or

Re: [Python-Dev] To 3.0.2 or not to 3.0.2?

2009-02-16 Thread Benjamin Peterson
On Mon, Feb 16, 2009 at 5:50 PM, Guido van Rossum wrote: > Can you explain the difficulty with porting setuptools in more detail? Basically setuptools invokes a functions in distutils that was still using cmp(). (See the latest messages in issue #1717 for all the details.) -- Regards, Benjami

Re: To unicode or not to unicode

2009-02-19 Thread Benjamin Peterson
Ron Garret flownet.com> writes: > > I'm writing a little wiki that I call µWiki. That's a lowercase Greek > mu at the beginning (it's pronounced micro-wiki). It's working, except > that I can't actually enter the name of the wiki into the wiki itself > because the default unicode encoding o

Re: "python -3" not working as expected

2009-01-08 Thread Benjamin Peterson
Steve Holden holdenweb.com> writes: > Thorsten Kampe wrote: > > Unfortunately I saw no warnings about print becoming a function in > > Python 3 ("print()"). Where is the problem? > > > I *believe* that's not flagged because 2to3 will fix it automatically. This is correct; there's not much point

Re: Code in __init__.py, is it bad form?

2009-02-23 Thread Benjamin Peterson
Michael Crute gmail.com> writes: > On Mon, Feb 23, 2009 at 9:03 PM, Steve Holden holdenweb.com> > wrote: > > No, it's absolutely fine. One common usage is to import symbols from > > sub-modules so that they are available from a simple import of the package. > > Yeah, I use it often for that I'm

Re: Proposed implementation for an Ordered Dictionary

2009-02-26 Thread Benjamin Peterson
Raymond Hettinger rcn.com> writes: > > Here's a proposed implementation for Py2.7 and Py3.1: > > http://code.activestate.com/recipes/576669/ > > Would like you guys to kick the tires, exercise it a bit, and let me > know what you think. The recipe runs under 2.6 and 3.0 without > modifica

Re: removing duplication from a huge list.

2009-02-26 Thread Benjamin Peterson
Shanmuga Rajan gmail.com> writes: > f any one suggests better solution then i will be very happy.Advance thanks for any help.Shan Use a set. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reason why co_filename is no longer interned?

2009-03-01 Thread Benjamin Peterson
David Christian gmail.com> writes: > This means that where before, you could rely that > .func_code.co_filename == .func_code.co_filename Regardless of the change's intentionality, you should never rely on that behavior! Interned strings are an implementation detail even at the C level. -- ht

Re: Reason why co_filename is no longer interned?

2009-03-01 Thread Benjamin Peterson
2009/3/1 David Christian : > On Sun, Mar 1, 2009 at 8:15 PM, Benjamin Peterson wrote: >> David Christian gmail.com> writes: >>> This means that where before, you could rely that >>> .func_code.co_filename == .func_code.co_filename >> >> Regardless of the

Re: Inverse of dict(zip(x,y))

2009-03-04 Thread Benjamin Peterson
Andre Engels gmail.com> writes: > y = d.values() might also work, but I am not sure whether d.keys() and > d.values() are guaranteed to use the same order. They are for the builtin dictionary type, but that requirement does not extend to any other mapping type. (It's not a requirement of the Mapp

Re: why python doesn't have a writeline() method like c# ?

2009-03-04 Thread Benjamin Peterson
ww gmail.com> writes: > > just curious, it would make writing to a file a bit easier? Because readline() returns the line with the newline attached, writeline() would have to require a newline at the. Therefore, it would be equivalent to write()! Just use f.write("some line\n"). -- http:/

Re: Question about binary file reading

2009-03-04 Thread Benjamin Peterson
Tino Wildenhain wildenhain.de> writes: > Rhodri James wrote: > > for b in x: > > print hex(ord(b)) > > > > better: > > print x.encode("hex") even better: import binascii print binascii.hexlify(some_bytes) -- http://mail.python.org/mailman/listinfo/python-list

Re: why python doesn't have a writeline() method like c# ?

2009-03-04 Thread Benjamin Peterson
Chris Rebert rebertia.com> writes: > Sidenote: file.writelines() seems very misleadingly named. Indeed since it is basically a shortcut for f.write("".join(lines)). -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about binary file reading

2009-03-04 Thread Benjamin Peterson
John Machin lexicon.net> writes: > On Mar 5, 12:13 pm, Benjamin Peterson wrote: > > > > import binascii > > print binascii.hexlify(some_bytes) > > AFAICT binascii.hexlify(some_bytes) gives the SAME result as > some_bytes.encode("hex") for much mor

Re: Sphinx for API documentation

2009-03-05 Thread Benjamin Peterson
Paul Hildebrandt yahoo.com> writes: > > I really like the look of Sphinx BUT I want autogenerated > documentation like Epydoc/doxygen. Does anyone know of a frontend for > Sphix that will make it work like Epydoc? There's a Sphinx extension called autodoc which should help you. -- http://m

Re: Sphinx for API documentation

2009-03-05 Thread Benjamin Peterson
2009/3/5 andrew cooke : > Benjamin Peterson wrote: >> Paul Hildebrandt yahoo.com> writes: >>> I really like the look of Sphinx BUT I want autogenerated >>> documentation like Epydoc/doxygen.  Does anyone know of a frontend for >>> Sphix that will make it w

Re: where is the PyString_AsString in Python 3.0?

2009-03-06 Thread Benjamin Peterson
BigHand gmail.com> writes: > > Guys: > I know that there is no PyString_AsString in Python3.0, > could you guys give me instruction about how can I do with the > following ? There is no PyString_AsString. Everything string is unicode now. (PyUnicode API) -- http://mail.python.org/mailman/lis

Re: where is the PyString_AsString in Python 3.0?

2009-03-06 Thread Benjamin Peterson
BigHand gmail.com> writes: > > There is no PyString_AsString. Everything >> string is unicode now. (PyUnicode API) > hello,Ben, > could you give me an example? I almost know the > PyUnicode API,but the > docs of 3.0 is too brief for me. PyString_FromString -> PyUnicode_FromString PyString_Concat

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Benjamin Peterson
TP Paralleles.invalid> writes: > > Hi everybody, > > I would like to prevent the loading of modules in the current directory. > For example, if I have a personal module in the current directory > named "os", when I do "import os", I would like Python to import os > standard module, not my perso

Re: where is the PyString_AsString in Python 3.0?

2009-03-06 Thread Benjamin Peterson
BigHand gmail.com> writes: > > Finally I got the results now. This did take me 10 hours to solve > this. the docs of 3.0.. > I hope this could help someone else: > const char *strExcType = PyBytes_AS_STRING(pyStr); > Py_XDECREF(str_exc_type); > Py_XDECREF(pyStr); You can't Py_DECREF() pySt

RELEASED Python 3.1 alpha 1

2009-03-07 Thread Benjamin Peterson
more information and downloads, see the Python 3.1 website: http://www.python.org/download/releases/3.1/ See PEP 375 for release schedule details: http://www.python.org/dev/peps/pep-0361/ Enjoy, -- Benjamin Benjamin Peterson benjamin at python.org Release Manager (on behalf of the entire p

Re: [Python-Dev] RELEASED Python 3.1 alpha 1

2009-03-07 Thread Benjamin Peterson
2009/3/7 Gerard Flanagan : > Benjamin Peterson wrote: > On the release page, the bzip link says '3.0' not '3.1'. That should be fixed now. > >> See PEP 375 for release schedule details: >> >>     http://www.python.org/dev/peps/pep-0361/ That URL i

Re: Themed TK (tk Tile) at last?!

2009-03-07 Thread Benjamin Peterson
Python Nutter gmail.com> writes: > The Python 3.1a web page still had what's new in Python 2.7 on the web > page so does this also enter the Python 2.x branch? I don't know yet. > But it so I might have a push to move off of 2.5.4 finally for the so > simple GUi based apps I have. Yes, it will b

Re: RELEASED Python 3.1 alpha 1

2009-03-07 Thread Benjamin Peterson
Scott David Daniels Acm.Org> writes: > > Benjamin Peterson wrote: > > On behalf of the Python development team and the Python community, I'm > > happy to announce the first alpha release of Python 3.1. > > Congratulations on the release. > I know 3.0 didn

Re: RELEASED Python 3.1 alpha 1

2009-03-07 Thread Benjamin Peterson
lycos.com> writes: > > Are the computed gotos used in the future pre-compiled Windows binary > (of V.3.1) too? I doubt it. I don't think they've even been built yet. Martin will now, though. > > Is such optimization going to be backported to the 2.x series too, > like Python 2.7? Probably n

Re: RELEASED Python 3.1 alpha 1

2009-03-08 Thread Benjamin Peterson
Colin J. Williams ncf.ca> writes: > Do you have any schedule for a Windows > binary release? They should materialize on Monday. -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to NASA at Python? :(

2009-03-11 Thread Benjamin Peterson
r gmail.com> writes: > > The Python home page no longer sports a promotion from NASA. What > happened, did we lose NASA. Where did they go? The python.org guys just decided it would be nice to have some different graphics. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory efficient tuple storage

2009-03-13 Thread Benjamin Peterson
psaffrey googlemail.com googlemail.com> writes: > > First of all, can anybody recommend a good way to show memory usage? Python 2.6 has a function called sys.getsizeof(). -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find "in" in the documentation

2009-03-13 Thread Benjamin Peterson
isbd.co.uk> writes: > > I've had this trouble before, how do I find the details of how "in" > works in the documentation. E.g. the details of:- > > if string in bigstring: > > It gets a mention in the "if" section but not a lot. Look here: http://docs.python.org/reference/expressions.ht

Re: error writing str to binary stream - fails in Python 3.0.1, works in 2.x

2009-03-16 Thread Benjamin Peterson
gmail.com> writes: > > self.out.write(b'BM') worked beautifully. Now I also have a similar > issue, for instance: > self.out.write("%c" % y) is also giving me the same error as the other > statement did. > I tried self.out.write(bytes("%c" %y),encoding=utf-8) in an attempt to > convert to bytes

Re: array next pointer

2009-03-17 Thread Benjamin Peterson
Luis Zarrabeitia uh.cu> schrieb: > > Works for python2.4 and 2.5 also. > > In python3, this should be used instead: > > >>> b = iter(a) > >>> c = next(b) > > (btw, I love the new sentinel argument for the next function in python3!) next() doesn't have a sentinel argument. It's iter() which do

Re: 2to3 does not fix FileType from types Module; no replacement?

2009-03-18 Thread Benjamin Peterson
tlink.de> schrieb: > and I could not find a replacement for 'FileType'. > Has this been overlooked? > > Found this thread which does not mention FileType: > http://mail.python.org/pipermail/stdlib-sig/2008-April/thread.html#172 > > I guess I just did not see something simple. > Anyone with a hi

Re: Object System

2009-03-19 Thread Benjamin Peterson
John Mendelewski gmail.com> writes: > > I was wondering if anyone had documents or articles what gave an in- > depth view of the object system in Python. Ones concerning dispatch, > how self really works, and maybe some meta-programming that comes > along with the new style classes. What do you

Re: Lambda forms and scoping

2009-03-19 Thread Benjamin Peterson
Márcio Faustino gmail.com> writes: > > Hi, > > Executing the example below doesn't produce the expected behavior, but > using the commented code does. Is this normal, or is it a problem with > Python? I've tested it with version 2.6.1 on Windows XP. > > Thanks, > > -- > > from abc import * >

Re: Why doesn't this work ? For loop variable scoping ?

2009-03-19 Thread Benjamin Peterson
Linuxguy123 gmail.com> writes: > > > Hi people. > > I've got a small piece of code that I don't understand. Basically, a > variable inside an if statement inside a for loop doesn't seem to be > updating. Is this a scope issue ? No, it's because you mispelled the variables. -- http://ma

Re: Object System

2009-03-19 Thread Benjamin Peterson
John Mendelewski gmail.com> writes: > > What goes on behind the scenes to make a.do() evaluate the do > method with a bound to self in that method? Is this implemented > in C, Python? I think I have a grasp of how to use objects, but > I was wondering about the implementation I suppose. This is

Re: Another of those "is" issues.

2009-03-20 Thread Benjamin Peterson
Emanuele D'Arrigo gmail.com> writes: > > >>> class MyClass(object): > ... def myMethod(self): > ... pass > ... > >>> c = MyClass() > >>> m = c.myMethod > >>> m is c.myMethod > False <--- What? Why is that? > > Can anybody shed some light? Or point to a resource to look at? Or > what

  1   2   3   >