Re: Bug in 3.12.5

2024-09-20 Thread Keith Thompson via Python-list
Martin Nilsson writes: > The attached program doesn’t work in 3.12.5, but in 3.9 it worked. Attachments don't show up either on the mailing list or the newsgroup. Try again with the program inline in your post (if it's not too long). -- Keith Thompson (The_Other_Keith) keith.s.thompso...@gmail

Re: Bug in 3.12.5

2024-09-20 Thread Cameron Simpson via Python-list
On 20Sep2024 12:52, Martin Nilsson wrote: The attached program doesn’t work in 3.12.5, but in 3.9 it worked. This mailing list discards attachments. Please include your code inline in the message text. Thanks, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in io.TextIOWrapper?

2023-06-19 Thread Jon Ribbens via Python-list
On 2023-06-19, Inada Naoki wrote: > I checked TextIOWrapper source code and confirmed that it doesn't call > encoder.write(text, finish=True) on close. > Since TextIOWrapper allows random access, it is difficult to call it > automatically. So please think it as just limitation rather than bug. > P

Re: Bug in io.TextIOWrapper?

2023-06-19 Thread Inada Naoki via Python-list
I checked TextIOWrapper source code and confirmed that it doesn't call encoder.write(text, finish=True) on close. Since TextIOWrapper allows random access, it is difficult to call it automatically. So please think it as just limitation rather than bug. Please use codec and binary file manually for

Re: Bug in io.TextIOWrapper?

2023-06-19 Thread Inada Naoki via Python-list
You can use file instead of BytesIO 2023年6月20日(火) 3:05 Peter J. Holzer via Python-list : > On 2023-06-20 02:15:00 +0900, Inada Naoki via Python-list wrote: > > stream.flush() doesn't mean final output. > > Try stream.close() > > After close() the value isn't available any more: > > Python 3.11.2

Re: Bug in io.TextIOWrapper?

2023-06-19 Thread Peter J. Holzer via Python-list
On 2023-06-20 02:15:00 +0900, Inada Naoki via Python-list wrote: > stream.flush() doesn't mean final output. > Try stream.close() After close() the value isn't available any more: Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" fo

Re: Bug in io.TextIOWrapper?

2023-06-19 Thread Inada Naoki via Python-list
stream.flush() doesn't mean final output. Try stream.close() 2023年6月20日(火) 1:40 Jon Ribbens via Python-list : > io.TextIOWrapper() wraps a binary stream so you can write text to it. > It takes an 'encoding' parameter, which it uses to look up the codec > in the codecs registry, and then it uses t

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-06 Thread Dieter Maurer
aapost wrote at 2023-3-5 09:35 -0500: > ... >If a file is still open, even if all the operations on the file have >ceased for a time, the tail of the written operation data does not get >flushed to the file until close is issued and the file closes cleanly. This is normal: the buffer is flushed if

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-06 Thread aapost
On 3/5/23 19:02, Cameron Simpson wrote: On 05Mar2023 10:38, aapost wrote: Additionally (not sure if this still applies): flush() does not necessarily write the file’s data to disk. Use flush() followed by os.fsync() to ensure this behavior. Yes. You almost _never_ need or want this behaviour

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-06 Thread aapost
On 3/5/23 09:35, aapost wrote: I have run in to this a few times and finally reproduced it. Whether it is as expected I am not sure since it is slightly on the user, but I can think of scenarios where this would be undesirable behavior.. This occurs on 3.11.1 and 3.11.2 using debian 12 testing,

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-06 Thread Weatherby,Gerard
Add f.reconfigure it you want line buffering in your example: f = open("abc", "w") f.reconfigure(line_buffering=True) for i in range(5): f.write(str(i) + "\n") More Pythonic would be: with open("abc", "w") as f: for i in range(5000): print(i,file=f) From: Python-list on behalf

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-06 Thread Barry
> On 6 Mar 2023, at 01:42, Greg Ewing via Python-list > wrote: > > On 6/03/23 1:02 pm, Cameron Simpson wrote: >> Also, fsync() need not expedite the data getting to disc. It is equally >> valid that it just blocks your programme _until_ the data have gone to disc. > > Or until it *thinks* t

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Chris Angelico
On Mon, 6 Mar 2023 at 12:41, Greg Ewing via Python-list wrote: > > On 6/03/23 1:02 pm, Cameron Simpson wrote: > > Also, fsync() need not expedite the data getting to disc. It is equally > > valid that it just blocks your programme _until_ the data have gone to > > disc. > > Or until it *thinks* th

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Greg Ewing via Python-list
On 6/03/23 1:02 pm, Cameron Simpson wrote: Also, fsync() need not expedite the data getting to disc. It is equally valid that it just blocks your programme _until_ the data have gone to disc. Or until it *thinks* the data has gone to the disk. Some drives do buffering of their own, which may i

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Cameron Simpson
On 05Mar2023 10:38, aapost wrote: Additionally (not sure if this still applies): flush() does not necessarily write the file’s data to disk. Use flush() followed by os.fsync() to ensure this behavior. Yes. You almost _never_ need or want this behaviour. A database tends to fsync at the end o

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Eryk Sun
On 3/5/23, aapost wrote: > > If a file is still open, even if all the operations on the file have > ceased for a time, the tail of the written operation data does not get > flushed to the file until close is issued and the file closes cleanly. This is normal behavior for buffered file I/O. There'

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Cameron Simpson
On 05Mar2023 09:35, aapost wrote: I have run in to this a few times and finally reproduced it. Whether it is as expected I am not sure since it is slightly on the user, but I can think of scenarios where this would be undesirable behavior.. This occurs on 3.11.1 and 3.11.2 using debian 12 test

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread Frank B
Am 05.03.23 um 15:35 schrieb aapost: I have run in to this a few times and finally reproduced it. Whether it is as expected I am not sure since it is slightly on the user, but I can think of scenarios where this would be undesirable behavior.. This occurs on 3.11.1 and 3.11.2 using debian 12 te

Re: Bug 3.11.x behavioral, open file buffers not flushed til file closed.

2023-03-05 Thread aapost
On 3/5/23 09:35, aapost wrote: Guess it could just be an annoying gotcha thing on me. calling at least f.flush() in any cases where an explicit close is delayed would be the solution. Additionally (not sure if this still applies): flush() does not necessarily write the file’s data to disk.

Re: Possible re bug when using ".*"

2023-01-01 Thread Peter J. Holzer
On 2022-12-28 19:07:06 +, MRAB wrote: > On 2022-12-28 18:42, Alexander Richert - NOAA Affiliate via Python-list > wrote: > > print(re.sub(".*", "replacement", "pattern")) > > yields the output "replacementreplacement". [...] > It's not a bug, it's a change in behaviour to bring it more into lin

Re: Possible re bug

2022-12-29 Thread Barry Scott
Please please fix you email client so that your replies stay with the emails you are replying to. Barry On 28/12/2022 19:09, Stefan Ram wrote: Alexander Richert writes: |print(re.findall(".*","pattern")) |yields ['pattern',''] which is not what I was expecting. The asterisk is "greedy", so

Re: Possible re bug when using ".*"

2022-12-28 Thread Ethan Furman
On 12/28/22 11:07, MRAB wrote: On 2022-12-28 18:42, Alexander Richert - NOAA Affiliate via Python-list wrote:   In a couple recent versions of Python (including 3.8 and 3.10), the following code: import re print(re.sub(".*", "replacement", "pattern")) yields the output "replacementreplacement".

Re: Possible re bug when using ".*"

2022-12-28 Thread MRAB
On 2022-12-28 18:42, Alexander Richert - NOAA Affiliate via Python-list wrote: In a couple recent versions of Python (including 3.8 and 3.10), the following code: import re print(re.sub(".*", "replacement", "pattern")) yields the output "replacementreplacement". This behavior does not occur in

Re: Possible re bug when using ".*"

2022-12-28 Thread Roel Schroeven
Roel Schroeven schreef op 28/12/2022 om 19:59: Alexander Richert - NOAA Affiliate via Python-list schreef op 28/12/2022 om 19:42: In a couple recent versions of Python (including 3.8 and 3.10), the following code: import re print(re.sub(".*", "replacement", "pattern")) yields the output "repla

Re: Possible re bug when using ".*"

2022-12-28 Thread Roel Schroeven
Alexander Richert - NOAA Affiliate via Python-list schreef op 28/12/2022 om 19:42: In a couple recent versions of Python (including 3.8 and 3.10), the following code: import re print(re.sub(".*", "replacement", "pattern")) yields the output "replacementreplacement". This behavior does not occu

Possible re bug when using ".*"

2022-12-28 Thread Alexander Richert - NOAA Affiliate via Python-list
In a couple recent versions of Python (including 3.8 and 3.10), the following code: import re print(re.sub(".*", "replacement", "pattern")) yields the output "replacementreplacement". This behavior does not occur in 3.6. Which behavior is the desired one? Perhaps relatedly, I noticed that even i

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 email.generator.BytesGenerator() [was: Why does SMTP.send_message() do from mangling?]

2021-09-26 Thread Grant Edwards
On 2021-09-27, Grant Edwards wrote: > According to > https://docs.python.org/3/library/email.generator.html#email.generator.BytesGenerator > the default from mangling behavior is _supposed_ to obey the message > policy if no policy or mangle_from_ value was > provided to the call to BytesGenerato

Re: Bug report

2021-02-24 Thread Peter Otten
On 24/02/2021 22:03, Dan Stromberg wrote: On Wed, Feb 24, 2021 at 12:58 PM Peter Otten <__pete...@web.de> wrote: On 24/02/2021 20:36, Carla Molina wrote: This is not a bug. Have a look at the array's dtype: >>> n = 60461826 >>> a = np.array([1, 50, 100, 150, 200, 250, 300]) >>> a.dtype d

Re: Bug report

2021-02-24 Thread Dan Stromberg
On Wed, Feb 24, 2021 at 12:58 PM Peter Otten <__pete...@web.de> wrote: > On 24/02/2021 20:36, Carla Molina wrote: > This is not a bug. Have a look at the array's dtype: > > >>> n = 60461826 > >>> a = np.array([1, 50, 100, 150, 200, 250, 300]) > >>> a.dtype > dtype('int32') > I'm getting dtypes

Re: Bug report

2021-02-24 Thread Dan Stromberg
I'm getting: /usr/local/cpython-2.7/bin/python (2.7.16) bad ('numpy version:', '1.16.6') Traceback (most recent call last): File "./nii", line 31, in assert left == right, "{} != {}".format(left, right) AssertionError: 86374.0371429 != 86374.0371429 /usr/local/cpython-3.0

Re: Bug report

2021-02-24 Thread Peter Otten
On 24/02/2021 20:36, Carla Molina wrote: I found the following bug (python 3.9.1) when multiplying an array by several variables without parentheses; look at the following example: import numpy as np NR = 0.25 N = 60461826 initialINCIDENCE = np.array([1, 50, 100, 150, 200, 250, 300]) initialIN

Re: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread dn via Python-list
On 23/07/2020 10:33, Chris Angelico wrote: -- Forwarded message - From: Jeff Linahan See attached image. Would be nice if it printed "SyntaxError: unbalanced parens" as it can difficult to see the problem if code like this is run in an environment that only prints the problem

Re: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Chris Angelico
On Thu, Jul 23, 2020 at 8:30 AM Jeff Linahan wrote: > > -- Forwarded message - > From: Jeff Linahan > Date: Wed, Jul 22, 2020, 5:23 PM > Subject: Fwd: [BUG] missing ')' causes syntax error on next line > To: > > > Subscribing to the mailing list as per the bot's request and resen

Re: Bug in the urljoin library

2020-04-28 Thread Peter Otten
Moro, Andrea via Python-list wrote: > Hello there, > > I believe there is a bug in the urljoin library. I believe this is a case of garbage-in garbage-out ;) Try p = urlparse(url) if not p.scheme: url = urlunparse(p._replace(scheme="http")) > > See below: > > p = urlparse(url) > if p.sc

Re: bug in ''.format()

2017-11-02 Thread Ken Kundert
Sure enough. There is it, right there in the documentation. I did not read far enough. My bad. Thanks! -Ken -- https://mail.python.org/mailman/listinfo/python-list

Re: bug in ''.format()

2017-11-02 Thread MRAB
On 2017-11-02 21:30, Ken Kundert wrote: I just encountered this: '{:0s}'.format('hello') Traceback (most recent call last): File "", line 1, in ValueError: '=' alignment not allowed in string format specifier The exception goes away if I do not specify a width of the string: '{:s}'.form

Re: Bug or intended behavior?

2017-06-15 Thread Chris Angelico
On Thu, Jun 15, 2017 at 11:37 PM, bob gailer wrote: > Slight OT digression: The language that is best for me is APL in which there > is no operator precedence to worry about. Execution is strictly > right-to-left. () are used when the order of evaluation needs to be altered. > I recall one person

Re: Bug or intended behavior?

2017-06-15 Thread bob gailer
Sending this to docs in hopes of improving documentation of % formatting and operator precedence. Perhaps add "see 6:16 Operator precedence." On 6/3/2017 5:59 PM, Sean DiZazzo wrote: On Friday, June 2, 2017 at 10:46:03 AM UTC-7, bob gailer wrote: On 6/2/2017 1:28 PM, Jussi Piitulainen wrote:

Re: Bug or intended behavior? (Posting On Python-List Prohibited)

2017-06-09 Thread Steve D'Aprano
On Fri, 9 Jun 2017 02:13 pm, Lawrence D’Oliveiro wrote: > On Sunday, June 4, 2017 at 9:59:11 AM UTC+12, Sean DiZazzo wrote: >> Looking at operator precedence, I only see the % operator in regards to >> modulus. Nothing in regards to string formatting. > > Operators in Python have no intrinsic me

Re: Bug or intended behavior? (Posting On Python-List Prohibited)

2017-06-09 Thread Steve D'Aprano
On Fri, 9 Jun 2017 02:23 pm, Lawrence D’Oliveiro wrote: > The indentation itself doesn’t provide enough grouping, cf > . Your argument is: "Now, what happens if these pieces of code get posted online somewhere,

Re: Bug or intended behavior?

2017-06-07 Thread Chris Angelico
On Thu, Jun 8, 2017 at 2:27 AM, Peter Pearson wrote: > More seriously, I thought "format" was the Cool New Thing toward which > all the cool kids were moving. But here I tried to be cool and put in a > plug for "format", and the hip community seems to be sticking up for > "%". Can I never get wi

Re: Bug or intended behavior?

2017-06-07 Thread Skip Montanaro
On Wed, Jun 7, 2017 at 11:27 AM, Peter Pearson wrote: > I thought "format" was the Cool New Thing toward which > all the cool kids were moving. But here I tried to be cool and put in a > plug for "format", and the hip community seems to be sticking up for > "%". The f"..." string is pretty new.

Re: Bug or intended behavior?

2017-06-07 Thread Peter Pearson
On Tue, 6 Jun 2017 13:16:00 -0400, Terry Reedy wrote: > On 6/5/2017 1:01 PM, Peter Pearson wrote: >> On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: >> [snip] >> print "foo %s" % 1-2 >>> Traceback (most recent call last): >>>File "", line 1, in >>> TypeError: unsupp

Re: Bug or intended behavior?

2017-06-06 Thread Steve D'Aprano
On Wed, 7 Jun 2017 03:16 am, Terry Reedy wrote: >> Personally I prefer a less compact but more explicit alternative: >> >> "foo {}".format(1-2) > > More compact: > >>> f'foo {1-2}' > 'foo -1' Also more mysterious and magical, and not backwards compatible. "Good news everybody! We have

Re: Bug or intended behavior?

2017-06-06 Thread Chris Angelico
On Wed, Jun 7, 2017 at 2:44 AM, Peter Pearson wrote: > On Tue, 6 Jun 2017 03:10:05 +1000, Chris Angelico wrote: >> On Tue, Jun 6, 2017 at 3:01 AM, Peter Pearson wrote: > [snip] >>> Say >>> "foo %s" % (1-2) >>> not >>> ("foo %s" % 1) - 2 >>> . >>> >>> Personally I prefer a less compact but

Re: Bug or intended behavior?

2017-06-06 Thread Terry Reedy
On 6/5/2017 1:01 PM, Peter Pearson wrote: On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: [snip] print "foo %s" % 1-2 Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for -: 'str' and 'int' Others have already pointed out

Re: Bug or intended behavior?

2017-06-06 Thread Peter Pearson
On Tue, 6 Jun 2017 03:10:05 +1000, Chris Angelico wrote: > On Tue, Jun 6, 2017 at 3:01 AM, Peter Pearson wrote: [snip] >> Say >> "foo %s" % (1-2) >> not >> ("foo %s" % 1) - 2 >> . >> >> Personally I prefer a less compact but more explicit alternative: >> >> "foo {}".format(1-2) > > The

Re: Bug or intended behavior?

2017-06-05 Thread Skip Montanaro
On Mon, Jun 5, 2017 at 2:26 PM, Marko Rauhamaa wrote: > Interestingly, however, Python hasn't extended that principle to the > expression syntax. You could have: > >>>> 1 + 2*3 >7 >>>> 1+2 * 3 >9 In a later post, you referenced a Wikipedia page on order of operations

Re: Bug or intended behavior?

2017-06-05 Thread Michael Torrie
On 06/05/2017 02:05 PM, Marko Rauhamaa wrote: > Michael Torrie : >> On 06/05/2017 01:26 PM, Marko Rauhamaa wrote: >>> Interestingly, however, Python hasn't extended that principle to the >>> expression syntax. You could have: >>> >>>>>> 1 + 2*3 >>>7 >>>>>> 1+2 * 3 >>>9 >> >> And th

Re: Bug or intended behavior?

2017-06-05 Thread Marko Rauhamaa
Michael Torrie : > On 06/05/2017 01:26 PM, Marko Rauhamaa wrote: >> Interestingly, however, Python hasn't extended that principle to the >> expression syntax. You could have: >> >>>>> 1 + 2*3 >>7 >>>>> 1+2 * 3 >>9 > > And thankfully they didn't. Because it wouldn't make sense to d

Re: Bug or intended behavior?

2017-06-05 Thread Michael Torrie
On 06/05/2017 01:26 PM, Marko Rauhamaa wrote: > Interestingly, however, Python hasn't extended that principle to the > expression syntax. You could have: > >>>> 1 + 2*3 >7 >>>> 1+2 * 3 >9 And thankfully they didn't. Because it wouldn't make sense to do so. Having whitespace inden

Re: Bug or intended behavior?

2017-06-05 Thread Chris Angelico
On Tue, Jun 6, 2017 at 5:26 AM, Marko Rauhamaa wrote: > Peter Pearson : > >> On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: >> [snip] >> print "foo %s" % 1-2 >>> Traceback (most recent call last): >>> File "", line 1, in >>> TypeError: unsupported operand type(s) for

Re: Bug or intended behavior?

2017-06-05 Thread Marko Rauhamaa
Peter Pearson : > On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: > [snip] > print "foo %s" % 1-2 >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unsupported operand type(s) for -: 'str' and 'int' > > Others have already pointed out that you

Re: Bug or intended behavior?

2017-06-05 Thread Chris Angelico
On Tue, Jun 6, 2017 at 3:01 AM, Peter Pearson wrote: > On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: > [snip] > print "foo %s" % 1-2 >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unsupported operand type(s) for -: 'str' and 'int' > > Oth

Re: Bug or intended behavior?

2017-06-05 Thread Peter Pearson
On Fri, 2 Jun 2017 10:17:05 -0700 (PDT), sean.diza...@gmail.com wrote: [snip] print "foo %s" % 1-2 > Traceback (most recent call last): > File "", line 1, in > TypeError: unsupported operand type(s) for -: 'str' and 'int' Others have already pointed out that you're assuming the wrong prece

Re: Bug or intended behavior?

2017-06-03 Thread Chris Angelico
On Sun, Jun 4, 2017 at 7:59 AM, Sean DiZazzo wrote: > I get what it's doing, it just doesn't make much sense to me. Looking at > operator precedence, I only see the % operator in regards to modulus. > Nothing in regards to string formatting. Is it just a side effect of the % > being overload

Re: Bug or intended behavior?

2017-06-03 Thread Sean DiZazzo
On Friday, June 2, 2017 at 10:46:03 AM UTC-7, bob gailer wrote: > On 6/2/2017 1:28 PM, Jussi Piitulainen wrote: > > sean.diza...@gmail.com writes: > > > >> Can someone please explain this to me? Thanks in advance! > >> > >> ~Sean > >> > >> > >> Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:

Re: Bug or intended behavior?

2017-06-02 Thread bob gailer
On 6/2/2017 1:28 PM, Jussi Piitulainen wrote: sean.diza...@gmail.com writes: Can someone please explain this to me? Thanks in advance! ~Sean Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits"

Re: Bug or intended behavior?

2017-06-02 Thread Irmen de Jong
On 2-6-2017 19:17, sean.diza...@gmail.com wrote: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" fo

Re: Bug or intended behavior?

2017-06-02 Thread justin walters
On Fri, Jun 2, 2017 at 10:17 AM, wrote: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more info

Re: Bug or intended behavior?

2017-06-02 Thread Jussi Piitulainen
sean.diza...@gmail.com writes: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information.

Re: Re - bug in tokenize module

2016-06-20 Thread Steven D'Aprano
On Tue, 21 Jun 2016 09:01 am, Harrison Chudleigh wrote: > Sorry. Only works with text files. But my point is still valid. What point? Without context, how are we supposed to know what you're talking about? We're not mind-readers you know. -- Steven -- https://mail.python.org/mailman/listin

Re - bug in tokenize module

2016-06-20 Thread Harrison Chudleigh
Sorry. Only works with text files. But my point is still valid. *** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended

Re: Bug in python34 package struct

2016-03-24 Thread Marko Rauhamaa
Rudi Lopez Lopez : > from struct import pack > > print(hex(126)) > print(pack('>H',126)) I can't see any bug. The tilde (~) has an ASCII code 126. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in python34 package struct

2016-03-24 Thread Chris Angelico
On Thu, Mar 24, 2016 at 7:17 PM, Rudi Lopez Lopez wrote: > from struct import pack > > print(hex(126)) > print(pack('>H',126)) Explain the bug? ChrisA -- 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

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!

2015-08-22 Thread Simon Ward
On 23 August 2015 00:06:44 BST, Chris Angelico wrote: >Precisely. Every time you support multiple versions of some >dependency, you have to test your code on all of them, and in the >common case (new features added in newer versions), you have to target >the oldest and weakest version. Just don

Re: Bug!

2015-08-22 Thread Chris Angelico
On Sun, Aug 23, 2015 at 11:22 AM, Simon Ward wrote: > > > On 23 August 2015 00:06:44 BST, Chris Angelico wrote: >>Precisely. Every time you support multiple versions of some >>dependency, you have to test your code on all of them, and in the >>common case (new features added in newer versions), y

Re: Bug!

2015-08-22 Thread Chris Angelico
On Sun, Aug 23, 2015 at 3:08 AM, Tim Golden wrote: > On 22/08/2015 02:02, Chris Angelico wrote: >> >> The security concerns of XP aren't Python's problem, and Python isn't >> in the business of twisting people's arms to make them upgrade just >> for the sake of upgrading. However, every new versio

Re: Bug!

2015-08-22 Thread Tim Golden
On 22/08/2015 02:02, Chris Angelico wrote: The security concerns of XP aren't Python's problem, and Python isn't in the business of twisting people's arms to make them upgrade just for the sake of upgrading. However, every new version of Windows introduces new APIs and features, so maintaining su

Re: Bug!

2015-08-21 Thread hamilton
On 8/21/2015 7:02 PM, Chris Angelico wrote: On Sat, Aug 22, 2015 at 9:53 AM, wrote: On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: On 8/21/2015 1:41 PM, Chris Angelico wrote: Python 3.5 does not support Windows XP. Is there a simple explanation for this ? Or is it just is

Re: Bug!

2015-08-21 Thread Chris Angelico
On Sat, Aug 22, 2015 at 2:37 PM, Rustom Mody wrote: > One of the charms of linux used to be (dunno how true today) that it could > run reasonably well on extremely underpowered hardware Still true, although it's not so much "Linux is better than Windows" as "Linux is more modular than Windows, so

Re: Bug!

2015-08-21 Thread Rustom Mody
On Saturday, August 22, 2015 at 6:32:56 AM UTC+5:30, Chris Angelico wrote: > On Sat, Aug 22, 2015 at 9:53 AM, sohcahtoa82 wrote: > > On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: > >> On 8/21/2015 1:41 PM, Chris Angelico wrote: > >> > Python 3.5 does not support Windows XP. > >>

Re: Bug!

2015-08-21 Thread Chris Angelico
On Sat, Aug 22, 2015 at 9:53 AM, wrote: > On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: >> On 8/21/2015 1:41 PM, Chris Angelico wrote: >> > Python 3.5 does not support Windows XP. >> >> Is there a simple explanation for this ? >> >> Or is it just is. > > I have no relationship w

Re: Bug!

2015-08-21 Thread sohcahtoa82
On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: > On 8/21/2015 1:41 PM, Chris Angelico wrote: > > Python 3.5 does not support Windows XP. > > Is there a simple explanation for this ? > > Or is it just is. I have no relationship with the Python developers, but I would say that run

Re: Bug!

2015-08-21 Thread Zachary Ware
On Fri, Aug 21, 2015 at 5:42 PM, hamilton wrote: > On 8/21/2015 1:41 PM, Chris Angelico wrote: >> >> Python 3.5 does not support Windows XP. > > > Is there a simple explanation for this ? > > Or is it just is. We don't see the need to be burdened by supporting versions of Windows that are no long

Re: Bug!

2015-08-21 Thread hamilton
On 8/21/2015 1:41 PM, Chris Angelico wrote: Python 3.5 does not support Windows XP. Is there a simple explanation for this ? Or is it just is. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug!

2015-08-21 Thread Terry Reedy
On 8/21/2015 4:36 PM, Oscar Benjamin wrote: On Fri, 21 Aug 2015 20:43 Chris Angelico mailto:ros...@gmail.com>> wrote: On Sat, Aug 22, 2015 at 5:31 AM, Miguel Alejandro Fernandez mailto:alejandrogr...@hotmail.com>> wrote: > *use a computer with WindowsXP Python 3.5 does not su

Re: Bug!

2015-08-21 Thread Oscar Benjamin
On Fri, 21 Aug 2015 20:43 Chris Angelico wrote: On Sat, Aug 22, 2015 at 5:31 AM, Miguel Alejandro Fernandez wrote: > > *use a computer with WindowsXP Python 3.5 does not support Windows XP. I suggest installing a better-supported operating system (or failing that, a better-supported version

Re: Bug!

2015-08-21 Thread Chris Angelico
On Sat, Aug 22, 2015 at 5:31 AM, Miguel Alejandro Fernandez wrote: > hello, python3.5rc1 when trying to install , the installer did not show the > button to start installing , to click in the middle he started ; after > installing I thought that everything would work fine but I could never run >

Re: Bug in floating point multiplication

2015-07-06 Thread Jason Swails
On Mon, Jul 6, 2015 at 11:44 AM, Oscar Benjamin wrote: > On Sat, 4 Jul 2015 at 02:12 Jason Swails wrote: > >> On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin < >> oscar.j.benja...@gmail.com> wrote: >> >>> On 2 July 2015 at 18:29, Jason Swails wrote: >>> >>> Where is the 32 bit one looks like: >

Re: Bug in floating point multiplication

2015-07-06 Thread Oscar Benjamin
On Sat, 4 Jul 2015 at 02:12 Jason Swails wrote: > On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote: > >> On 2 July 2015 at 18:29, Jason Swails wrote: >> >> Where is the 32 bit one looks like: >> >> $ objdump -d a.out.32 | less >> ... > > 804843e: fildl -0x

Re: Bug in floating point multiplication

2015-07-06 Thread Jonas Wielicki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02.07.2015 19:29, Jason Swails wrote: > // maths.h #include #include > > int main() { double x; int i; x = 1-pow(0.5, 53); > > for (i = 1; i < 100; i++) { if ((int)(i*x) == i) { > printf("%d\n", i); break; } } > > return 0; } Does not

  1   2   3   4   5   6   7   8   >