Error in linalg.inv ??

2009-06-06 Thread Ajith Kumar
Hello, I ran the following code (Using Debian 5.0) from numpy import * a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c print dot(b,c) print dot(c,b) And the result is [[ 1. 2. 3.] [ 4. 5. 6.] [ 7. 8. 9.]] [[ 3.15221191e+15 -6.30442381e+15 3.15221191e+15] [

Re: Scope objects

2009-06-06 Thread s0suk3
On Jun 5, 8:56 pm, Robert Dailey rcdai...@gmail.com wrote: Is it possible to create an object in Python that will clean itself up at function exit? I realize destruction of objects may not occur immediately and can be garbage collected, but this functionality would still be great to have.

Re: python 3.1 - io.BufferedReader.peek() incomplete or change of behaviour.

2009-06-06 Thread Gabriel Genellina
En Fri, 05 Jun 2009 17:04:45 -0300, Frederick Reeve cy...@solace.info escribió: I have sent this message to the authors as well as to this list. If this is the wrong list please let me know where I should be sending it... dev perhaps? I think the best place is the bug tracker:

Re: spammers on pypi

2009-06-06 Thread Lawrence D'Oliveiro
In message dd8295d3-61ab-4cc9-86b8-1e04f3edd...@f16g2000vbf.googlegroups.com, joep wrote: Is there a way to ban spammers from pypi? Yes, but it doesn't work. -- http://mail.python.org/mailman/listinfo/python-list

Re: __file__ access extremely slow

2009-06-06 Thread Zac Burns
I think I have figured this out, thanks for your input. The time comes from lazy modules related to e-mail importing on attribute access, which is acceptable. Hence of course why ImportError was sometime raised. I originally was thinking that accessing __file__ was triggering some mechanism that

Re: Error in linalg.inv ??

2009-06-06 Thread John Machin
On Jun 6, 3:34 pm, Ajith Kumar aj...@iuac.res.in wrote: Hello,  I ran the following code (Using Debian 5.0) from numpy import * a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c print dot(b,c) print dot(c,b) And the result is [[ 1.  2.  3.]  [ 4.  5.  6.]  

Re: Error in linalg.inv ??

2009-06-06 Thread Nick Craig-Wood
Ajith Kumar aj...@iuac.res.in wrote: I ran the following code (Using Debian 5.0) from numpy import * a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c print dot(b,c) print dot(c,b) And the result is [[ 1. 2. 3.] [ 4. 5. 6.] [ 7. 8.

Re: urlretrieve() failing on me

2009-06-06 Thread Peter Otten
Robert Dailey wrote: Well I did not post the code because it is fairly complex and its hard to give you the whole picture without giving you too much code. But here you go, you get what you ask for: def Download( self ): PrintSubStatus( 'Downloading...' ) destination = normalize(

Re: Way to use proxies login to site?

2009-06-06 Thread Kushal Kumaran
On Fri, Jun 5, 2009 at 10:32 PM, inVINCable invinceable...@gmail.com wrote: On May 5, 12:51 pm, Kushal Kumaran kushal.kuma...@gmail.com wrote: On Wed, Apr 29, 2009 at 8:21 AM, inVINCable invinceable...@gmail.com wrote: On Apr 27, 7:40 pm, inVINCable invinceable...@gmail.com wrote: Hello,

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Miles Kaufmann
On Jun 4, 2009, at 3:25 AM, Hendrik van Rooyen wrote: A can is like a pickle, in that it is a string, but anything can be canned. Unlike a pickle, a can cannot leave the process, though, unless the object it points to lives in shared memory. If you have any interest, contact me and I will send

Re: Scope objects

2009-06-06 Thread Gabriel Genellina
En Sat, 06 Jun 2009 03:03:34 -0300, s0s...@gmail.com escribió: On Jun 5, 8:56 pm, Robert Dailey rcdai...@gmail.com wrote: Is it possible to create an object in Python that will clean itself up at function exit? I realize destruction of objects may not occur immediately and can be garbage

Re: A simpler logging configuration file format?

2009-06-06 Thread Lawrence D'Oliveiro
In message 30db8a0b-5b19-47e4-9364-54cbd7a7c...@h23g2000vbc.googlegroups.com, geoff.ba...@gmail.com wrote: At the moment, if I want to add a new logger foo writing to its own file foo to my config file, I have to repeat the name 7(!) times, editing 3 different sections in the process: I

Re: Christian Audigier Bikinis

2009-06-06 Thread Lawrence D'Oliveiro
In message f4f5e0c7-c16b-4570-9327- d571f9863...@d31g2000vbm.googlegroups.com, tanvo...@gmail.com wrote: Please check our web ... Wow, you have a web. I always wanted to have one of those. -- http://mail.python.org/mailman/listinfo/python-list

Re: Messing up with classes and their namespace

2009-06-06 Thread Dave Angel
Jean-Michel Pichavant wrote: div class=moz-text-flowed style=font-family: -moz-fixedScott David Daniels wrote: Jean-Michel Pichavant wrote: Hello world, I had recently a very nasty bug in my python application. The context is quite complex, but in the end the problem can be resume as

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Gabriel Genellina g-...@yahoo.com.ar wrote: From your description of the problem, it seems you are acting upon messages received from a serial port. You have to process the message *before* the next one arrives -- but you gain nothing doing that much faster. In other words, even with a

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Scott David Daniels s@acm.org wrote: I can think of use cases for can, and from that use an alternate construct. The use case is passing a reference out over a wire (TCP port?) that will be used later. This will work, provided the thing is still alive and in the same place when the can

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Miles Kaufmann m...@umich.edu wrote: On Jun 4, 2009, at 3:25 AM, Hendrik van Rooyen wrote: A can is like a pickle, in that it is a string, but anything can be canned. Unlike a pickle, a can cannot leave the process, though, unless the object it points to lives in shared memory. If

interval arithmetic libraries

2009-06-06 Thread srepmub
Hi all, I'm looking for libraries that allow one to calculate with sets of (date) intervals. So for example, I'd like to be able to calculate the overlap between two sets of intervals, the union etc. Preferrably, this works with datetime objects, is written in pure Python, and has reasonably good

py3k printing generators -- not!

2009-06-06 Thread samwyse
The one thing that's killing me in Python 3000 is that every time I try to print something, it seems like I get generator object genexpr at 0x01BAF508. Googling only found one reference, a posting elsewhere by one Carl Johnson (aka carlj7,

Re: MD6 in Python

2009-06-06 Thread Aahz
In article mailman.1221.1244248275.8015.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: Aahz wrote: Um, what? You mean 3.1rc1, right? Nevertheless, my understanding is that 2.7 is mostly restricted to code landed in 3.1, so your second statement is roughly correct. My

Re: py3k printing generators -- not!

2009-06-06 Thread Carl Banks
On Jun 6, 5:28 am, samwyse samw...@gmail.com wrote: The one thing that's killing me in Python 3000 is that every time I try to print something, it seems like I get generator object genexpr at 0x01BAF508.  Googling only found one reference, a posting elsewhere by one Carl Johnson (aka

Re: py3k printing generators -- not!

2009-06-06 Thread bearophileHUGS
samwyse: Always saying print(','.join(x)) gets tiresome in a hurry.  I've thought about defining my own function prnt that wraps print and fixes generators, but that requires me to get their type, Why do you need to know their type? Isn't something like this enough? def pr(it): txt =

PyQt icon problem

2009-06-06 Thread Pieter Provoost
Hi, My application has a QSystemTrayIcon, which needs to be changed once in a while. The PNG icons are converted into a module using pyrcc4. When I run the Python script on my Windows system everything works fine, but when run it on Ubuntu or when I use py2exe, the icons are not visible (there's

Re: py3k printing generators -- not!

2009-06-06 Thread bearophileHUGS
Carl Banks: What about print(list(x)) Right, better than mine :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: openhook

2009-06-06 Thread Scott David Daniels
Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k printing generators -- not!

2009-06-06 Thread samwyse
On Jun 6, 7:58 am, Carl Banks pavlovevide...@gmail.com wrote: On Jun 6, 5:28 am, samwyse samw...@gmail.com wrote: Always saying print(','.join(x)) gets tiresome in a hurry.   What about print(list(x)) Yeah, I like that. Or, to save some typing: prnt = lambda x: print(list(x))

Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread akindo
Hi all. I am new to Python and have a problem regarding data structures. In my application I will be having several messages and my own type of IDs (Lamport clocks) to go with these messages. I will need to frequently ask for specific messages based on the ID. Hence a dictionary seems a

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 23:07:58 +0800, tsangpo wrote: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' else '/' Is there a better way? if not url.endswith('/'): url += '/' -- Steven --

Re: openhook

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 06:47:34 -0700, Scott David Daniels wrote: Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. It's just like closehook, only different. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt icon problem

2009-06-06 Thread Pieter Provoost
Correction: when using py2exe, no icon, empty space or message is visible (the app is running though). On Ubuntu, there is an empty space but messages are not displayed. 2009/6/6 Pieter Provoost pieterprovo...@gmail.com Hi, My application has a QSystemTrayIcon, which needs to be changed once

Re: Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread Diez B. Roggisch
akindo schrieb: Hi all. I am new to Python and have a problem regarding data structures. In my application I will be having several messages and my own type of IDs (Lamport clocks) to go with these messages. I will need to frequently ask for specific messages based on the ID. Hence a

Re: can it be shorter?

2009-06-06 Thread kj
In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' else '/' Is there a better way? It's a pity that in python regexes are an extra, as it were.

Re: Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread bearophileHUGS
akindo: So, it seems I want the best of both worlds: specific indexing using   my own IDs/keys (not just by list element location), sorting and the   ability to start iterating from a specific location. A sorted associative map may be fit. A data structure based on a search tree, like a

Re: openhook

2009-06-06 Thread Martin P. Hellwig
Steven D'Aprano wrote: On Sat, 06 Jun 2009 06:47:34 -0700, Scott David Daniels wrote: Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. It's just like closehook, only different. Just like the flipflophook, the quantumhook and captain hook. -- MPH

Re: can it be shorter?

2009-06-06 Thread tsangpo
kj no.em...@please.post 写入消息 news:h0e3p9$85...@reader1.panix.com... In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' else '/' Is there a

Re: py3k printing generators -- not!

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 05:28:30 -0700, samwyse wrote: The one thing that's killing me in Python 3000 Python 3000 was vapourware. When the vapour condensed into liquid, it was renamed Python 3. Right now, the only vapourware is Python4000, which may or may not be created by Guido's heir some

python repository?

2009-06-06 Thread woodchips
Hi, I've written a large body of my work in MATLAB over the years. But it looks like I'll need to move to Python soon. Is there a common resource where people can post files for others to use such as the MATLAB central file exchange? Thanks, John --

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 15:59:37 +, kj wrote: In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' else '/' Is there a better way? It's a pity

Re: openhook

2009-06-06 Thread Emile van Sebille
On 6/6/2009 6:47 AM Scott David Daniels said... Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. OK -- kidding aside, the only python related reference I find is in a proposal and patch [1] made by Anthony Roy for changes to the fileinput module.

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sun, 07 Jun 2009 00:21:45 +0800, tsangpo wrote: kj no.em...@please.post 写入消息 news:h0e3p9$85t $...@reader1.panix.com... In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url =

ANN: pyTenjin 0.8.0 - much faster template engine than Django

2009-06-06 Thread kwatch
I have released pyTenjin 0.8.0 http://www.kuwata-lab.com/tenjin/ pyTenjin is the fastest template engine for Python. * Very fast (about 10 times faster than Django template engine) * Easy to learn (no need to learn template-original language) * Full-featured (layout template, partial template,

Re: Programming language comparison examples?

2009-06-06 Thread Simon Brunning
2009/6/5 bearophileh...@lycos.com: someone: I thought there was a website which demonstrated how to program a bunch of small problems in a number of different languages. http://www.rosettacode.org/wiki/Main_Page http://en.literateprograms.org/LiteratePrograms:Welcome

Re: can it be shorter?

2009-06-06 Thread kj
In 023a8d04$0$20636$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Sat, 06 Jun 2009 15:59:37 +, kj wrote: In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I

Re: python repository?

2009-06-06 Thread Benjamin Kaplan
On Saturday, June 6, 2009, woodch...@rochester.rr.com wrote: Hi, I've written a large body of my work in MATLAB over the years. But it looks like I'll need to move to Python soon. Is there a common resource where people can post files for others to use such as the MATLAB central file

Re: openhook

2009-06-06 Thread Nick Craig-Wood
Gaudha sanal.vik...@gmail.com wrote: Can anybody tell me what is meant by 'openhook' ? http://docs.python.org/library/fileinput.html?highlight=openhook Maybe ;-) -- Nick Craig-Wood n...@craig-wood.com -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list

Re: can it be shorter?

2009-06-06 Thread Nick Craig-Wood
tsangpo tsangpo.newsgr...@gmail.com wrote: kj no.em...@please.post 写入消息 news:h0e3p9$85...@reader1.panix.com... In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url

Re: multi-core software

2009-06-06 Thread George Neuner
On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green see_webs...@mindprod.com.invalid wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false

Is it possible to use multidimensional arrays ?

2009-06-06 Thread pdlemper
All attempts have failed. import WConio import array screen = array.array('H',[0]*75,[0]*24) ERR array takes at most 2 arguments screen = array.array('H',[0]*75[0]*24) TypeErr int object is unsubscriptable

Re: multi-core software

2009-06-06 Thread John Thingstad
På Sat, 06 Jun 2009 21:46:51 +0200, skrev George Neuner gneun...@comcast.net: On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green Add to that the fact that programmers have shown themselves, on average, to be remarkably bad at figuring out what _should_ be done in parallel - as opposed to what

Servizio aziende : messaggio per python-list@python.org

2009-06-06 Thread v . donati
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN !-- saved from url=(0052)http://localhost:1293/ContaktoMailSender/message.htm -- HTMLHEADTITLE/TITLE META http-equiv=Content-Type content=text/html; charset=utf-8 META content=Microsoft FrontPage 4.0 name=GENERATOR/HEAD BODY POffriamo :/P

Re: Is it possible to use multidimensional arrays ?

2009-06-06 Thread kj
In hsgl255g4curs2aekdb0i0lra4ho5hv...@4ax.com pdlem...@earthlink.net writes: All attempts have failed. import WConio import array screen = array.array('H',[0]*75,[0]*24) ERR array takes at most 2 arguments screen =

Re: Error in linalg.inv ??

2009-06-06 Thread Robert Kern
On 2009-06-06 00:34, Ajith Kumar wrote: Hello, I ran the following code (Using Debian 5.0) from numpy import * Please ask numpy questions on the numpy mailing list, not here: http://www.scipy.org/Mailing_Lists a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c

Re: Is it possible to use multidimensional arrays ?

2009-06-06 Thread Robert Kern
On 2009-06-06 14:48, pdlem...@earthlink.net wrote: All attempts have failed. import WConio import array screen = array.array('H',[0]*75,[0]*24) ERR array takes at most 2 arguments screen = array.array('H',[0]*75[0]*24)

Re: Odd closure issue for generators

2009-06-06 Thread Terry Reedy
Michele Simionato wrote: Yes, most functional languages have the concept of streams. You can even define a stream-comprehension that looks like Python generator comprehension but it is an essentially different thing. See for instance http://www.artima.com/weblogs/viewpost.jsp?thread=251159 I

Re: can it be shorter?

2009-06-06 Thread kj
In h0e9q8$ni...@reader1.panix.com kj no.em...@please.post writes: In 023a8d04$0$20636$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Sat, 06 Jun 2009 15:59:37 +, kj wrote: In h0e0oi$1es...@adenine.netfront.net tsangpo tsangpo.newsgr...@gmail.com

Re: Error in linalg.inv ??

2009-06-06 Thread Terry Reedy
Ajith Kumar wrote: [[ 1. 2. 3.] [ 4. 5. 6.] [ 7. 8. 9.]] Another way to see that this is singular is notice or calculate that (1,2,3) - 2*(4,5,6) + (7,8,9) = (0,0,0) Same is true for the columns. -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in linalg.inv ??

2009-06-06 Thread John Machin
Robert Kern robert.kern at gmail.com writes: On 2009-06-06 00:34, Ajith Kumar wrote: from numpy import * Please ask numpy questions on the numpy mailing list, not here: http://www.scipy.org/Mailing_Lists a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) And the

Re: can it be shorter?

2009-06-06 Thread MRAB
kj wrote: In h0e9q8$ni...@reader1.panix.com kj no.em...@please.post writes: In 023a8d04$0$20636$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Sat, 06 Jun 2009 15:59:37 +, kj wrote: In h0e0oi$1es...@adenine.netfront.net tsangpo

#! to two different pythons?

2009-06-06 Thread mh
I've got a bunch of python programs on linux that start with: #!/usr/anim/menv/bin/pypix Now I'm moving some to the mac, where I'm changing that to: #!/Users/mh/py/bin/python What's the best way to handle this? I've got an install script that rewrites the first line, but if I could

Re: py3k printing generators -- not!

2009-06-06 Thread Terry Reedy
samwyse wrote: The one thing that's killing me in Python 3000 py3.0 or py3.1, but the 'problem' you complain about has nothing to do with those versions in particular. is that every time I try to print something, it seems like I get generator object genexpr at 0x01BAF508. Nor does it

Re: #! to two different pythons?

2009-06-06 Thread Benjamin Peterson
mh at pixar.com writes: What's the best way to handle this? #!/usr/bin/env python -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in linalg.inv ??

2009-06-06 Thread Carl Banks
On Jun 6, 3:31 pm, Robert Kern robert.k...@gmail.com wrote: On 2009-06-06 17:09, John Machin wrote: Robert Kernrobert.kernat  gmail.com  writes: You have a very singular matrix (2*a[1] - a[0] == a[2]). You cannot invert it numerically and expect sensible results. Is raising an

Re: Odd closure issue for generators

2009-06-06 Thread Aahz
In article mailman.1249.1244323524.8015.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: (1) Calling the first and rest methods 'car' and 'cdr' convinces me that schemers really do not want scheme to be popular, but prefer it to remain a small cult language. What, you don't get a

Re: #! to two different pythons?

2009-06-06 Thread mh
Benjamin Peterson benja...@python.org wrote: #!/usr/bin/env python But how can I handle this with two differently named pythons? #!/usr/anim/menv/bin/pypix #!/Users/mh/py/bin/python Thanks! Mark -- Mark Harrison Pixar Animation Studios --

Re: #! to two different pythons?

2009-06-06 Thread Cameron Simpson
On 06Jun2009 23:46, m...@pixar.com m...@pixar.com wrote: | Benjamin Peterson benja...@python.org wrote: | #!/usr/bin/env python | | But how can I handle this with two differently named pythons? | | #!/usr/anim/menv/bin/pypix | #!/Users/mh/py/bin/python Well, it depends _why_ you have a

Re: #! to two different pythons?

2009-06-06 Thread mh
Cameron Simpson c...@zip.com.au wrote: - Keep the #!/usr/bin/env python and then: ln -s /usr/anim/menv/bin/pypix /usr/local/bin/python Ah, that's a good idea. The pypix is a company-wide maintained python, but ln -s python pypix on my local Mac laptop python install makes the env work

Re: Making the case for repeat

2009-06-06 Thread Tim Roberts
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Why is it that it's (almost) always newbies with about five minutes' worth of experience with Python that come up with these grandiose plans to replace entire modules with a single function? Well, many great innovations in history

Re: multi-core software

2009-06-06 Thread Jeff M.
On Jun 6, 9:58 pm, Paul Rubin http://phr...@nospam.invalid wrote: George Neuner gneun...@comcast.net writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching. I thought the definition of green threads

Re: Making the case for repeat

2009-06-06 Thread Terry Reedy
Tim Roberts wrote: Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Why is it that it's (almost) always newbies with about five minutes' worth of experience with Python that come up with these grandiose plans to replace entire modules with a single function? Well, many great

Re: Making the case for repeat

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 19:32:31 -0700, Tim Roberts wrote: Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Why is it that it's (almost) always newbies with about five minutes' worth of experience with Python that come up with these grandiose plans to replace entire modules with a single

[issue6219] nested list value change

2009-06-06 Thread Pushkar Paranjpe
New submission from Pushkar Paranjpe pushkarparan...@gmail.com: Is this a bug ? a = [[1,2],[3,4],[5,6]] a [[1, 2], [3, 4], [5, 6]] b = a[0] b [1, 2] b[0] = - b [-, 2] a [[-, 2], [3, 4], [5, 6]] Created a new variable (b) which refers to an element in a list (a). Changing

[issue6196] tarfile.extractall(readaccess=True)

2009-06-06 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: I close this issue then. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6196 ___

[issue6219] nested list value change

2009-06-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This is correct behavior. Try making a new *copy* of the sublist: a = [[1,2],[3,4],[5,6]] b = a[0][:] b[0] = - -- nosy: +rhettinger resolution: - invalid status: open - closed

[issue6220] typo: opne in doanddont

2009-06-06 Thread cate
New submission from cate c...@debian.org: http://docs.python.org/dev/howto/doanddont.html use twice in example the opne function, which should be written as open. From google it seems that also 3.x is affected (but not really checked) -- assignee: georg.brandl components: Documentation

[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister
John Szakmeister j...@szakmeister.net added the comment: Here's a patch for trunk. -- keywords: +patch nosy: +jszakmeister Added file: http://bugs.python.org/file14203/issue-6220-doanddont.patch ___ Python tracker rep...@bugs.python.org

[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: That typo is intentional, it's also written in the comment: try: foo = opne(file) # misspelled open except: sys.exit(could not open file!) This example shows how a bare except will catch the NameError caused by 'opne' and return the

[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6220 ___ ___

[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister
John Szakmeister j...@szakmeister.net added the comment: That'll teach me to pay more attention before submitting a patch. Thanks Ezio! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6220

[issue6214] test__locale broken on trunk

2009-06-06 Thread Vikram U Shenoy
Vikram U Shenoy vikram.u.she...@gmail.com added the comment: Georg has fixed it in r73252. -- nosy: +vshenoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6214 ___

[issue6220] typo: opne in doanddont

2009-06-06 Thread John Szakmeister
John Szakmeister j...@szakmeister.net added the comment: Actually, what's the second example trying to show: try: foo = opne(file) # will be changed to open as soon as we run it except IOError: sys.exit(could not open file) I'm not sure what that comment really means? --

[issue6218] Make io.BytesIO and io.StringIO picklable.

2009-06-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think it's too late for 3.1, since it's a new feature. -- nosy: +benjamin.peterson, pitrou versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6218

[issue1143] Update to latest ElementTree in Python 2.7

2009-06-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1143 ___ ___

[issue6220] typo: opne in doanddont

2009-06-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If we use the bare except: the message could not open file! is shown and we would waste time trying to figure out why it can't be opened. Instead, if we use except IOError:, the first time we run the program the error NameError: name 'opne'

[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It turns out that doctest patches linecache.getlines (which is not, by the way, a public interface of linecache according to the docs and the __all__ string) to retrieve the doctest source code. The special filename it uses to trigger

[issue6221] Windows buildbot failure in test_winreg

2009-06-06 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: I'm filing this as release blocker since it might indicate serious breakage (I'm not a Windows expert). == FAIL: testLocalMachineRegistryWorks (test.test_winreg.WinregTests)

[issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32?

2009-06-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm not sure it is as non-controversial as it seems. Someone should 1) do the math 2) show impact on a couple of benchmarks of his choice -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue6195] Serious regression in doctest in Py3.1rc1

2009-06-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: OK, here is a revised patch that passes all tests, including the new one. -- stage: needs patch - patch review Added file: http://bugs.python.org/file14204/issue6195.patch ___ Python tracker

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've added an entry in the what's new file in r73254. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6137 ___

[issue6222] 2to3 except fixer failed in certain case

2009-06-06 Thread Haoyu Bai
New submission from Haoyu Bai divine...@gmail.com: The 2to3 except fixer will be failed with this code: try: raise TypeError except TypeError, x: pass with this code, 2to3 will produce an empty diff, i.e. it fixes nothing. But when change it to the following, 2to3 works again: try:

[issue6222] 2to3 except fixer failed in certain case

2009-06-06 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r73255. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6222

[issue6223] Make _PyUnicode_AsString as public API

2009-06-06 Thread Haoyu Bai
New submission from Haoyu Bai divine...@gmail.com: Why _PyUnicode_AsString and _PyUnicode_AsStringAndSize are not public API? They are very useful when porting extension module to Python 3, because they have the semantic as same as PyString_AsString. For extension author, these API can be used

[issue6223] Make _PyUnicode_AsString as public API

2009-06-06 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: They are not public because implicitly encoding unicode is bad practice in Python 3. You should use PyUnicode_AsEncodedString() or such. -- nosy: +benjamin.peterson resolution: - rejected status: open - closed

[issue6211] [Tutorial] Section 4.7.2 has a wrong description of an example

2009-06-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r73257. Please respect the limit of 80 chars per line in future patches :) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue6204] Missing reference in section 4.6 to chapter on classes

2009-06-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, applied in r73258! -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6204 ___

[issue6217] Add _io._TextIOWrapper.errors

2009-06-06 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks for the report! Fixed in r73259. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6217

[issue6224] References to JPython

2009-06-06 Thread Thijs Triemstra
New submission from Thijs Triemstra li...@collab.nl: The documentation refers to JPython in several places, which is the old name, it's called Jython nowadays. - platform.java_ver - tkinter -- assignee: georg.brandl components: Documentation messages: 89012 nosy: georg.brandl, thijs

[issue6214] test__locale broken on trunk

2009-06-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6214 ___

[issue6224] References to JPython

2009-06-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r73260. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6224 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I've uploaded a new version of the patch and test suite. I wanted a few more test cases but didn't want to litter the test directory with little test files, so I borrowed some techniques from test_import and created the modules to import

[issue4966] Improving Lib Doc Sequence Types Section

2009-06-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - needs patch type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966

  1   2   >