Re: bug in python 3.10.4

2022-05-26 Thread Dennis Lee Bieber
On Thu, 26 May 2022 19:56:16 +1200, dn declaimed the following: Commentary meant for the OP, not "dn". >Please reply to the list. Others may be able to assist (particularly if >they use MS-Windows!). > > >> Removing the quit does not help with the problem. >> >> input 10 x 10

Re: bug in python 3.10.4

2022-05-26 Thread MRAB
On 2022-05-26 02:46, Shuaib Akhtar wrote: When double clicking a .py file when have python install. It run file but at a spot of the program it stop running. But using the built-in ide for python this problem does not happen also any other ide it work fine When you double-click on a

Re: bug in python 3.10.4

2022-05-26 Thread dn
Please reply to the list. Others may be able to assist (particularly if they use MS-Windows!). > Removing the quit does not help with the problem. > > input 10 x 10 What was the result, or the exception report. Once again: did MS-Windows finish the job and close the window before you could se

Re: bug in python 3.10.4

2022-05-25 Thread dn
On 26/05/2022 13.46, Shuaib Akhtar wrote: >When double clicking a .py file when have python install. It run file but >at a spot of the program it stop running. But using the built-in ide for >python this problem does not happen also any other ide it work fine Please provide (minimal) e

Re: Bug in Python?

2016-02-28 Thread Sven R. Kunze
On 27.02.2016 12:48, Terry Reedy wrote: On 2/27/2016 4:44 AM, Steven D'Aprano wrote: On Sat, 27 Feb 2016 07:55 pm, Terry Reedy wrote: In other words, when that doc says *list*, it means a *list*. "To create a heap, use a list initialized to [], or you can transform a populated list into a hea

Re: Bug in Python?

2016-02-28 Thread Sven R. Kunze
On 27.02.2016 00:07, eryk sun wrote: On Fri, Feb 26, 2016 at 4:08 PM, Sven R. Kunze wrote: Python sometimes seems not to hop back and forth between C and Python code. Can somebody explain this? Normally a C extension would call PySequence_SetItem, which would call the type's sq_ass_item, whi

Re: Bug in Python?

2016-02-28 Thread Sven R. Kunze
On 26.02.2016 23:37, Ian Kelly wrote: On Fri, Feb 26, 2016 at 3:08 PM, Sven R. Kunze wrote: Python sometimes seems not to hop back and forth between C and Python code. C code as a rule tends to ignore dunder methods. Those are used to implement Python operations, not C operations. Ah, good t

Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/27/2016 4:44 AM, Steven D'Aprano wrote: On Sat, 27 Feb 2016 07:55 pm, Terry Reedy wrote: In other words, when that doc says *list*, it means a *list*. "To create a heap, use a list initialized to [], or you can transform a populated list into a heap via function heapify()." [...] "A hea

Re: Bug in Python?

2016-02-27 Thread Steven D'Aprano
On Sat, 27 Feb 2016 07:55 pm, Terry Reedy wrote: > In other words, when that doc says *list*, it means a *list*. > > "To create a heap, use a list initialized to [], or you can transform a > populated list into a heap via function heapify()." [...] > "A heap must be an instance of *list* (and not

{off topic] Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/26/2016 9:21 PM, mentific...@gmail.com wrote: On Friday, February 26, 2016 at 2:09:07 PM UTC-8, Sven R. Kunze wrote: Hi everybody, I recognized the following oddity (background story: http://srkunze.blogspot.com/2016/02/lets-go-down-rabbit-hole.html). Python sometimes seems not to hop bac

Re: Bug in Python?

2016-02-27 Thread Terry Reedy
On 2/26/2016 6:07 PM, eryk sun wrote: On Fri, Feb 26, 2016 at 4:08 PM, Sven R. Kunze wrote: Python sometimes seems not to hop back and forth between C and Python code. Can somebody explain this? Normally a C extension would call PySequence_SetItem, which would call the type's sq_ass_item, w

Re: Bug in Python?

2016-02-26 Thread mentificium
On Friday, February 26, 2016 at 2:09:07 PM UTC-8, Sven R. Kunze wrote: > Hi everybody, > > I recognized the following oddity (background story: > http://srkunze.blogspot.com/2016/02/lets-go-down-rabbit-hole.html). > > Python sometimes seems not to hop back and forth between C and Python code. >

Re: Bug in Python?

2016-02-26 Thread eryk sun
On Fri, Feb 26, 2016 at 4:37 PM, Ian Kelly wrote: > So I would guess that the difference here is because one > implementation is entirely C, and the other implementation is entirely > Python. Exactly, the C implementation of siftup is only called internally. So there's no need to export it as a f

Re: Bug in Python?

2016-02-26 Thread eryk sun
On Fri, Feb 26, 2016 at 4:08 PM, Sven R. Kunze wrote: > Python sometimes seems not to hop back and forth between C and Python code. > Can somebody explain this? Normally a C extension would call PySequence_SetItem, which would call the type's sq_ass_item, which for MyList is slot_sq_ass_item. Th

Re: Bug in Python?

2016-02-26 Thread Ian Kelly
On Fri, Feb 26, 2016 at 3:08 PM, Sven R. Kunze wrote: > Python sometimes seems not to hop back and forth between C and Python code. C code as a rule tends to ignore dunder methods. Those are used to implement Python operations, not C operations. > _siftup(heap, 0)# that's C Your com

Re: Bug in Python 3.5.1

2015-12-24 Thread Laurent Pointal
Hello, nisthesec...@verizon.net wrote: > Dear Sir, >I downloaded and installed Python 3.5.1 in Windows 10. >The pip command was not part of it. >In the future, can you kindly include numpy, scipy, and pygame as part >of the Python release? >I am a teacher trying to teach P

Re: Bug in Python 3.5.1

2015-12-24 Thread Cody Piersall
On Wed, Dec 23, 2015 at 6:57 PM, wrote: > Dear Sir, >In the future, can you kindly include numpy, scipy, and pygame as part of >the Python release? >Nick Srinivasan Hello Nick, Any time you want to install a Python package, the first thing you should try is typing "pip install [p

Re: Bug in Python 3.5.1

2015-12-24 Thread Mark Lawrence
On 24/12/2015 00:57, nisthesec...@verizon.net wrote: Dear Sir, I downloaded and installed Python 3.5.1 in Windows 10. The pip command was not part of it. In the future, can you kindly include numpy, scipy, and pygame as part of the Python release? I am a teacher trying to

Re: Bug in Python

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:01 PM, Kiuhnm wrote: > I read that bug fix releases have a 6-month cycle :( > It seems that I'll have to work around the problem... If a fix has been committed, the easiest thing to do is clone the Mercurial repository and build Python from source. Takes a little bit of

Re: Bug in Python

2012-04-19 Thread Kiuhnm
On 4/18/2012 3:08, Kiuhnm wrote: I'm using Python 3.2.2, 64 bit on Windows 7. Consider this code: ---> print(1) print(2) print(3) with open('test') as f: data = f.read() with open('test') as f: data = f.read() <--- If I debug this code with python -m pdb script.py and I issue the command j 7 Py

Re: Bug in Python

2012-04-18 Thread Terry Reedy
On 4/18/2012 10:22 AM, Kiuhnm wrote: The bug was confirmed and a patch is now available: http://bugs.python.org/issue14612 And applied to 2.7, 3.2, and 3.3. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in Python

2012-04-18 Thread Kiuhnm
The bug was confirmed and a patch is now available: http://bugs.python.org/issue14612 Kiuhnm -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in Python

2012-04-18 Thread Kiuhnm
On 4/18/2012 6:47, Hans Mulder wrote: On 18/04/12 03:08:08, Kiuhnm wrote: print(1) print(2) print(3) with open('test') as f: data = f.read() with open('test') as f: data = f.read() I get the same result with Pythin 3.3.0a0 on MacOS X 10.6: 93> ./python.exe -m pdb /tmp/script.py /

Re: Bug in Python

2012-04-17 Thread Terry Reedy
On 4/18/2012 12:47 AM, Hans Mulder wrote: On 18/04/12 03:08:08, Kiuhnm wrote: print(1) print(2) print(3) with open('test') as f: data = f.read() with open('test') as f: data = f.read() How much of that is needed to trigger the problem? All three prints? Any of them? I get the same

Re: Bug in Python

2012-04-17 Thread John O'Hagan
On Wed, 18 Apr 2012 03:08:08 +0200 Kiuhnm wrote: > I'm using Python 3.2.2, 64 bit on Windows 7. > > Consider this code: > ---> > print(1) > print(2) > print(3) > > with open('test') as f: > data = f.read() > with open('test') as f: > data = f.read() > <--- > If I debug this code with

Re: Bug in Python

2012-04-17 Thread Hans Mulder
On 18/04/12 03:08:08, Kiuhnm wrote: > print(1) > print(2) > print(3) > > with open('test') as f: > data = f.read() > with open('test') as f: > data = f.read() I get the same result with Pythin 3.3.0a0 on MacOS X 10.6: 93> ./python.exe -m pdb /tmp/script.py > /tmp/script.py(1)() -> print(

Re: bug in python documentation?

2010-09-11 Thread Vito 'ZeD' De Tullio
Benjamin Kaplan wrote: > You're looking at the 2.7 documentation. Are you using 2.7? whoops, no: 2.6.5 :\ (but the "new in python X.Y.Z" disclaimer does not apply to the example snippets?) -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in python documentation?

2010-09-11 Thread Thomas Jollans
On Saturday 11 September 2010, it occurred to Vito 'ZeD' De Tullio to exclaim: > from http://docs.python.org/library/unittest.html > > $ python test_unittest.py > .E. > == > ERROR: test_sample (__main__.TestSequenceFunctions) > --

Re: bug in python documentation?

2010-09-11 Thread Benjamin Kaplan
On Sat, Sep 11, 2010 at 11:34 AM, Vito 'ZeD' De Tullio wrote: > from http://docs.python.org/library/unittest.html > > -->8>8>8>8>8>8>8>8>8>8>8>8-- > > Here is a short script to test three functions from the random module: > > import random > import unitt

Re: Bug in Python 2.6 urlencode

2010-09-07 Thread John Nagle
On 9/7/2010 9:56 PM, Ned Deily wrote: In article<4c87013f$0$1625$742ec...@news.sonic.net>, John Nagle wrote: On 9/7/2010 5:43 PM, Terry Reedy wrote: On 9/7/2010 3:02 PM, John Nagle wrote: There's a bug in Python 2.6's "urllib.urlencode". If you pass in a Unicode character outside the ASCII

Re: Bug in Python 2.6 urlencode

2010-09-07 Thread Ned Deily
In article <4c87013f$0$1625$742ec...@news.sonic.net>, John Nagle wrote: > On 9/7/2010 5:43 PM, Terry Reedy wrote: > > On 9/7/2010 3:02 PM, John Nagle wrote: > >> There's a bug in Python 2.6's "urllib.urlencode". If you pass > >> in a Unicode character outside the ASCII range, instead of it > >> b

Re: Bug in Python 2.6 urlencode

2010-09-07 Thread John Nagle
On 9/7/2010 5:43 PM, Terry Reedy wrote: On 9/7/2010 3:02 PM, John Nagle wrote: There's a bug in Python 2.6's "urllib.urlencode". If you pass in a Unicode character outside the ASCII range, instead of it being encoded properly, an exception is raised. File "C:\python26\lib\urllib.py", line 1267,

Re: Bug in Python 2.6 urlencode

2010-09-07 Thread Terry Reedy
On 9/7/2010 3:02 PM, John Nagle wrote: There's a bug in Python 2.6's "urllib.urlencode". If you pass in a Unicode character outside the ASCII range, instead of it being encoded properly, an exception is raised. File "C:\python26\lib\urllib.py", line 1267, in urlencode v = quote_plus(str(v)) U

Re: Bug in Python 2.6 urlencode

2010-09-07 Thread Ned Deily
In article <4c868c2d$0$1581$742ec...@news.sonic.net>, John Nagle wrote: > Is it worth reporting 2.x bugs any more? Or are we in the > version suckage period, where version N is abandonware and > version N+1 isn't deployable yet. Yes!! 2.7 is being actively maintained for bug fixes. (2.6 o

Re: Bug in Python set

2010-05-02 Thread Terry Reedy
On 5/2/2010 8:11 AM, dmitrey wrote: Python 2.6.5 r265:79063 set().update(set()) is None True while I expect result of update to be set. Also, result of set().add(None) is None while I expect it to be set with element None (or, maybe, it should be empty set?) 'Expect' has two different meaning

Re: Bug in Python set

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 05:11:40 -0700, dmitrey wrote: > Python 2.6.5 r265:79063 set().update(set()) is None > True > while I expect result of update to be set. Change your expectations. Generally, methods which modify the object rather than creating a new one return None. >>> s = set([1,2,3])

Re: Bug in Python set

2010-05-02 Thread Aahz
In article <0bd314a8-db65-43f1-a999-521e2ed71...@n15g2000yqf.googlegroups.com>, dmitrey wrote: > >Python 2.6.5 r265:79063 set().update(set()) is None >True >while I expect result of update to be set. >Also, result of >set().add(None) >is None while I expect it to be set with element None (or,

Re: Bug in Python APscheduler module.

2010-03-18 Thread Terry Reedy
On 3/19/2010 2:03 AM, anand jeyahar wrote: Hi , I looked everywhere and could find no mention of this(might be looking in the wrong places point me please..). the Python package Advanced python scheduler seems to have a bug with the unschedule func. The site for that package http://ap

Re: Bug in python [was: Fatal Python error: ceval: tstate mix-up]

2009-01-12 Thread Terry Reedy
Terry Reedy wrote: Laszlo Nagy wrote: Laszlo Nagy wrote: Meanwhile I'm trying to turn off threads in that program one by one. I just got this new type of error: Fatal Python error: PyThreadState_Delete: invalid tstate After some days, there are now answers to my question. I guess this is bec

Re: Bug in python [was: Fatal Python error: ceval: tstate mix-up]

2009-01-12 Thread Terry Reedy
Laszlo Nagy wrote: Laszlo Nagy wrote: Meanwhile I'm trying to turn off threads in that program one by one. I just got this new type of error: Fatal Python error: PyThreadState_Delete: invalid tstate After some days, there are now answers to my question. I guess this is because nobody knows th

Re: Bug in Python class static variable?

2007-07-03 Thread Bruza
On Jul 2, 1:21 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Bruza <[EMAIL PROTECTED]> wrote: > > On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > >> Bruza <[EMAIL PROTECTED]> wrote: > >> > I am trying to define a class static variable. But the value of the > >> > static variable seems

Re: Bug in Python class static variable?

2007-07-02 Thread Duncan Booth
Bruza <[EMAIL PROTECTED]> wrote: > On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> Bruza <[EMAIL PROTECTED]> wrote: >> > I am trying to define a class static variable. But the value of the >> > static variable seems to be only defined inside the file that the >> > class is declared.

Re: Bug in Python class static variable?

2007-07-02 Thread Bruza
On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Bruza <[EMAIL PROTECTED]> wrote: > > I am trying to define a class static variable. But the value of the > > static variable seems to be only defined inside the file that the > > class is declared. See the code below. When I run "python w

Re: Bug in Python class static variable?

2007-07-02 Thread Duncan Booth
Bruza <[EMAIL PROTECTED]> wrote: > I am trying to define a class static variable. But the value of the > static variable seems to be only defined inside the file that the > class is declared. See the code below. When I run "python w.py", I > got: When you run "python w.py" the *script* w.py is lo

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-08 Thread Ayaz Ahmed Khan
"Gabriel Genellina" typed: > > See > http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm Thanks for the link, Gabriel. I didn't know about this. -- Ayaz Ahmed Khan Falling in love makes smoking pot all day look like the ultimate in restraint. -- Dave Sim

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-08 Thread Bruno Desthuilliers
C Barr Leigh a écrit : > Help! Have I found a serious bug? No. This is a FAQ. Default arguments of functions are evaled only once - when the def statement is eval'd and the function object constructed. > This seems like highly undesired behaviour to me. Possibly, but this is unlikely to change

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Bjoern Schliessmann
John Nagle wrote: > True. It would make sense to disallow mutable values as > initial values for optional arguments. The present behavior > is silly. Why? You're free to only use immutables. Regards, Björn -- BOFH excuse #42: spaghetti cable cause packet failure -- http://mail.pytho

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread C Barr Leigh
Oh, oops! Of course... :) A great and sensible feature if you're expecting it. Thanks very much, everyone, for the links and discussion! Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > def factorial(n, _cache={}): > try: >return _cache[n] > except KeyError: > There are other ways of implementing caches, but this is quick and easy > and works well for many functions. I like this better (examples are untested): def

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Steven D'Aprano
On Thu, 08 Mar 2007 03:14:53 +, John Nagle wrote: > Paul Rubin wrote: >> "C Barr Leigh" <[EMAIL PROTECTED]> writes: >> >>>Help! Have I found a serious bug? >>>This seems like highly undesired behaviour to me. From the program >>>below, I get output: >> >> >> It is intentional, not a bug, se

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread George Sakkis
On Mar 7, 10:24 pm, Paul Rubin wrote: > John Nagle <[EMAIL PROTECTED]> writes: > > True. It would make sense to disallow mutable values as > > initial values for optional arguments. The present behavior is silly. > > That would be the worst of both worlds. The main

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread George Sakkis
On Mar 7, 10:14 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > "C Barr Leigh" <[EMAIL PROTECTED]> writes: > > >>Help! Have I found a serious bug? > >>This seems like highly undesired behaviour to me. From the program > >>below, I get output: > > > It is intentional, not a bug, se

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > True. It would make sense to disallow mutable values as > initial values for optional arguments. The present behavior is silly. That would be the worst of both worlds. The main alternative to the present behavior is re-computing the default value eve

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread John Nagle
Paul Rubin wrote: > "C Barr Leigh" <[EMAIL PROTECTED]> writes: > >>Help! Have I found a serious bug? >>This seems like highly undesired behaviour to me. From the program >>below, I get output: > > > It is intentional, not a bug, see the docs. Whether it's desirable is > a different question.

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Gabriel Genellina
En Wed, 07 Mar 2007 23:39:21 -0300, C Barr Leigh <[EMAIL PROTECTED]> escribió: > Help! Have I found a serious bug? Not at all! This is by design. > def testPersistence(anarg,twooption=[]): > #print anarg > if not twooption: > twooption.append('Set within test for '+anarg) See

Re: Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread Paul Rubin
"C Barr Leigh" <[EMAIL PROTECTED]> writes: > Help! Have I found a serious bug? > This seems like highly undesired behaviour to me. From the program > below, I get output: It is intentional, not a bug, see the docs. Whether it's desirable is a different question. -- http://mail.python.org/mailman

Re: Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am getting somewhat random UnicodeDecodeError messages in my program. > > It is random in that I will be going through a pysqlite database of > records, manipulate > the results, and it will throw UnicodeDecodeError apparently without > regard > as to what data is bein

Re: Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > ... partway through the database results I get something like this: > for item in list: > UnicodeDecodeError : 'utf8' codec can't decode bytes in position 26-28: > invalid data It is quite likely that the position is not what you think it is. For one of the bad string

Re: bug in python/numarray

2005-08-02 Thread Xiangyi
L PROTECTED]> To: Sent: Tuesday, August 02, 2005 1:03 PM Subject: Re: bug in python/numarray > [EMAIL PROTECTED] wrote: >> Hi, there, >> >> I got different results by running the same lines of code on windows and >> debian. Here is the code: >> >> a

Re: bug in python/numarray

2005-08-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, there, > > I got different results by running the same lines of code on windows and > debian. Here is the code: > > a = kroneckerproduct(ones((4195,1)), identity(12)) > print a.mean() > > This works perfectly well in windows but it gave the following error while

Re: bug in python/numarray

2005-08-02 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, there, > > I got different results by running the same lines of code on windows and > debian. Here is the code: > > a = kroneckerproduct(ones((4195,1)), identity(12)) I don't know what this does, but wonder if it uses a lot of mem