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

bug in python 3.10.4

2022-05-25 Thread Shuaib Akhtar
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       -- https://mail.python.org/mailman/listinfo/python-list

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

Bug in Python?

2016-02-26 Thread Sven R. Kunze
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. Can somebody explain this? class MyList(list): count = 0 def __setitem__

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

Bug in Python 3.5.1

2015-12-24 Thread nisthesecond
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 Python to my students. To get a working version of

Re: locale bug in Python 2.7, 3.3, 3.4 (Win7 64)?

2015-02-09 Thread Albert-Jan Roskam
- Original Message - > From: Mark Lawrence > To: python-list@python.org > Cc: > Sent: Monday, February 9, 2015 5:02 PM > Subject: Re: locale bug in Python 2.7, 3.3, 3.4 (Win7 64)? > > On 09/02/2015 15:43, Albert-Jan Roskam wrote: >> Hi, >>

Re: locale bug in Python 2.7, 3.3, 3.4 (Win7 64)?

2015-02-09 Thread Mark Lawrence
On 09/02/2015 15:43, Albert-Jan Roskam wrote: Hi, In the locale module we have: * setlocale, the setter that also returns something * getlocale, the getter that returns the OS-specific locale tuple (supposedly!) * getdefaultlocale, the getter that always returns a unix locale tuple Why are the

locale bug in Python 2.7, 3.3, 3.4 (Win7 64)?

2015-02-09 Thread Albert-Jan Roskam
Hi, In the locale module we have: * setlocale, the setter that also returns something * getlocale, the getter that returns the OS-specific locale tuple (supposedly!) * getdefaultlocale, the getter that always returns a unix locale tuple Why are the getlocale() results below sometimes windows-lik

Re: Is this a bug in Python 3.3?

2013-09-17 Thread Terry Reedy
On 9/17/2013 7:22 AM, Aseem Bansal wrote: While using IDLE I used the license() function to see the license information. In it there was a list of all the versions and from which version they are derived is written. The 2.7 list ends with 2.7. The 3.x does not even include 2.7. The list goe

Is this a bug in Python 3.3?

2013-09-17 Thread Aseem Bansal
While using IDLE I used the license() function to see the license information. In it there was a list of all the versions and from which version they are derived is written. The list goes upto 3.3.1 but doesn't include 3.3.2. Is that a minor bug or is the current version not mentioned in that l

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(

Bug in Python

2012-04-17 Thread Kiuhnm
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 Python crashes. Kiuhnm

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

bug in python documentation?

2010-09-11 Thread Vito 'ZeD' De Tullio
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 unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self):

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 c

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 Uni

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\

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

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

Bug in Python 2.6 urlencode

2010-09-07 Thread John Nagle
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(

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,

Bug in Python set

2010-05-02 Thread dmitrey
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?) Regards, D. -- http://mail.python.org/mailman/listinfo/python-list

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

Bug in Python APscheduler module.

2010-03-18 Thread anand jeyahar
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. When passing the function of an object it doesn't remove it from the scheduler. bu

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-30 Thread Ron Croonenberg
hello, is there a way, in python, to create a splash window and when the program has completed disappears by sending a msg to it? (I tried creating two gtk windows but gtk_main doesn't seem to return unless it gets closed.) tia Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-30 Thread Lie Ryan
On 12/30/2009 9:10 AM, inhahe wrote: Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import inspect def a(b=1): pass inspect.getargvalues(a) Traceback (most recent call last):

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread inhahe
On Tue, Dec 29, 2009 at 6:38 PM, Irmen de Jong wrote: > On 29-12-2009 23:22, inhahe wrote: > > inspect.getargvalues is used on frames, not on regular code objects. > Maybe you were looking for inspect.getargspec? > That explains it! I knew I'd done this before, I was just looking at the wrong fun

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread Irmen de Jong
On 29-12-2009 23:22, inhahe wrote: On Tue, Dec 29, 2009 at 5:11 PM, inhahe wrote: On Tue, Dec 29, 2009 at 5:10 PM, inhahe wrote: So i'm guessing that the attribute has been changed from func_code to f_code but the inspect module wasn't updated to reflect that. er i mean from f_code to fun

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread Daniel Fetchinson
On 12/29/09, inhahe wrote: > Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] > on > win32 > Type "help", "copyright", "credits" or "license" for more information. import inspect def a(b=1): pass > ... inspect.getargvalues(a) > Traceback (most recent call

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread inhahe
On Tue, Dec 29, 2009 at 5:11 PM, inhahe wrote: > On Tue, Dec 29, 2009 at 5:10 PM, inhahe wrote: >> >> So i'm guessing that the attribute has been changed from func_code to >> f_code but the inspect module wasn't updated to reflect that. >> > > er i mean from f_code to func_code > f_locals doesn'

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread inhahe
On Tue, Dec 29, 2009 at 5:10 PM, inhahe wrote: > > So i'm guessing that the attribute has been changed from func_code to > f_code but the inspect module wasn't updated to reflect that. > er i mean from f_code to func_code -- http://mail.python.org/mailman/listinfo/python-list

I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-29 Thread inhahe
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> def a(b=1): pass ... >>> inspect.getargvalues(a) Traceback (most recent call last): File "", line 1, in File "C:\P

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

2009-01-12 Thread Terry Reedy
is is because nobody knows the answer. I think I need to consider this a bug in Python. Where can I post a bug report? bugs.python.org Before submitting, search for existing report of same bug. If none, try to write a minimal program that reliably reproduces the bug. (If you can't, it wi

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

2009-01-12 Thread Terry Reedy
knows the answer. I think I need to consider this a bug in Python. Where can I post a bug report? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list

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

2009-01-12 Thread Laszlo Nagy
ink I need to consider this a bug in Python. Where can I post a bug report? Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Casey
L1 is a list of three different lists, although each list holds the same values. L2 is a list of three references to the same list (the '*' operator doesn't do a deep copy). So when you modify any of the referenced lists, you modify all of them. Try this: >>> q = [1, 1, 1] >>> r = [q, q, q] >>>

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Chris Rebert
On Thu, Jan 1, 2009 at 10:13 AM, wrote: > Consider these two lists comprehensions: > > L1=[[1 for j in range(3)] for i in range(3)] > L2=[[1]*3]*3 > So far, everything is OK, but let us now modify the lists' contents in > the following way: > It seems a misbehaviour in Python, or there is somet

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Miles
On Thu, Jan 1, 2009 at 1:13 PM, wrote: > Consider these two lists comprehensions: > > L1=[[1 for j in range(3)] for i in range(3)] > L2=[[1]*3]*3 > [snip] > > It seems a misbehaviour in Python, or there is something I do not > understand in the syntax It's not a Python bug. Does this help

Is this a bug in Python or something I do not understand.

2009-01-01 Thread davidalvi
Consider these two lists comprehensions: L1=[[1 for j in range(3)] for i in range(3)] L2=[[1]*3]*3 print L1 print L2 print L1==L2 The result is: [[1, 1, 1], [1, 1, 1], [1, 1, 1]] [[1, 1, 1], [1, 1, 1], [1, 1, 1]] True So far, everything is OK, but let us now modify the lists' contents in the f

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

Bug in Python class static variable?

2007-07-02 Thread Bruza
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: 000===> Hello World 001===> Hello World 002===> Not Initialized 003===> Not

Re: a bug in python windows service?

2007-05-28 Thread momobear
On May 27, 11:25 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 27 May 2007 09:07:36 -0300, momobear <[EMAIL PROTECTED]> escribió: > > >> Instead of extending join(), write a specific method to signal the > >> quitEvent or just let the caller signal it. And I don't see in this > >> ex

Re: a bug in python windows service?

2007-05-27 Thread Gabriel Genellina
En Sun, 27 May 2007 09:07:36 -0300, momobear <[EMAIL PROTECTED]> escribió: >> Instead of extending join(), write a specific method to signal the >> quitEvent or just let the caller signal it. And I don't see in this >> example why do you need two different events (one on the thread, another >> on

Re: a bug in python windows service?

2007-05-27 Thread momobear
> Instead of extending join(), write a specific method to signal the > quitEvent or just let the caller signal it. And I don't see in this > example why do you need two different events (one on the thread, another > on the service controller), a single event would suffice. I don't think a single

Re: a bug in python windows service?

2007-05-27 Thread momobear
> No, this is not a bug. You must not call Thread.run(), use Thread.start() > instead - else your code won't run in a different thread of execution. See > http://docs.python.org/lib/thread-objects.htmlon how to use Thread > objects - and note that you should *only* override __init__ and run, if

Re: a bug in python windows service?

2007-05-26 Thread Gabriel Genellina
En Sat, 26 May 2007 23:00:45 -0300, momobear <[EMAIL PROTECTED]> escribió: > I feel really puzzled about fellowing code, please help me finger out > what problem here. > > import threading > > class workingthread(threading.Thread): > def __init__(self): > self.quitEvent = threadi

a bug in python windows service?

2007-05-26 Thread momobear
I feel really puzzled about fellowing code, please help me finger out what problem here. import threading class workingthread(threading.Thread): def __init__(self): self.quitEvent = threading.Event() self.waitTime = 10 threading.Thread.__init__(self)

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

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

2007-03-07 Thread C Barr Leigh
Help! Have I found a serious bug? This seems like highly undesired behaviour to me. From the program below, I get output: call1: ['sdf'] call2: ['Set within test for call2'] call3: ['Set within test for call2'] instead of what I should get, call1: ['sdf'] call2: ['Set within test for call2'] cal

Re: sgmllib bug in Python 2.5, works in 2.4.

2007-02-07 Thread John Nagle
John Nagle wrote: > (Was prevously posted as a followup to something else by accident.) > >I'm running a website page through BeautifulSoup. It parses OK > with Python 2.4, but Python 2.5 fails with an exception: > > Traceback (most recent call last): >File "./sitetruth/InfoSitePage.py",

Re: sgmllib bug in Python 2.5, works in 2.4.

2007-02-04 Thread Stefan Rank
on 05.02.2007 03:49 John Nagle said the following: > (Was prevously posted as a followup to something else by accident.) > > I'm running a website page through BeautifulSoup. It parses OK > with Python 2.4, but Python 2.5 fails with an exception: > > Traceback (most recent call last): >

sgmllib bug in Python 2.5, works in 2.4.

2007-02-04 Thread John Nagle
(Was prevously posted as a followup to something else by accident.) I'm running a website page through BeautifulSoup. It parses OK with Python 2.4, but Python 2.5 fails with an exception: Traceback (most recent call last): File "./sitetruth/InfoSitePage.py", line 268, in httpfetch

Re: Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-26 Thread Rotem
> * comp.lang.python is not the place to file bug reports Agreed > * more detail is needed that what's been given so far Agreed. I will investigate further when I get a chance and determine if it's a problem on my end. Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-25 Thread R. Bernstein
"Rotem" <[EMAIL PROTECTED]> writes: > Hi, > > I noticed that pydb.pm() also fails in python2.5 when invoked on that > same example (seems like also trying to access a nonexistent > attribute/variable). > > Is this known to you as well/was it fixed? Doesn't do that for me for Python 2.5 on both

Re: Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-25 Thread Rotem
sessment of whether the problem encountered is > a pdb bug or not. It could be a bug in Python. (Right now it is only > known to be a bug in version 2.5.) > > For a given traceback t, the question is whether t.tb_frame.f_lineno > can ever be different from t.tb_lineno. > > Sti

Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-25 Thread R. Bernstein
I'd like to change my assessment of whether the problem encountered is a pdb bug or not. It could be a bug in Python. (Right now it is only known to be a bug in version 2.5.) For a given traceback t, the question is whether t.tb_frame.f_lineno can ever be different from t.tb_lineno. Still

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

Bug in python (Weird UnicodeDecodeError)

2005-12-13 Thread dbri . tcc
Hello 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 being used. For example I am readin

  1   2   >