Re: GoPiGo script

2015-11-02 Thread hakugin . gin
On Monday, November 2, 2015 at 8:45:35 AM UTC-5, hakug...@gmail.com wrote: > On Monday, November 2, 2015 at 8:29:26 AM UTC-5, input/ld...@casema.nl wrote: > > I tried to use def loop(): now for to restart the script. > > but its only restart "fwd()" print ("forward 1x") and then stop. > > It does

[issue25495] binascii documentation incorrect

2015-11-02 Thread Mouse
Mouse added the comment: 1. I concede knowing nothing about the early Python library implementation, functionality, or even purpose. 2. I don't think it makes sense now to either refer to PEM. We'd be two decades too late for that (well, 27 years, to be precise :). See

Re: GoPiGo script

2015-11-02 Thread input/ldompeling
Thank you for the explanation for it. I must tell you that i yust beginning with python. I bought the book beginning programming with python. In reply to "Dennis Lee Bieber" who wrote the following: > On Mon, 02 Nov 2015 13:29:04 GMT, input/ldompel...@casema.nl declaimed the >

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-02 Thread Stefan Krah
Stefan Krah added the comment: Thanks, no big problem. The thing is that the parts I wrote (Modules/_decimal/*, Objects/memoryobject.c, Modules/_testbuffer.c) have been audited rather heavily and have 100% code coverage with a privately maintained patch that inserts allocation failures. There

[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-02 Thread Fred Gansevles
Fred Gansevles added the comment: Xavier, thanks! you found it. If I look the code again, I see that with zero, one, four and five the context-manager (i.e. Context()) and the target (one .. five) are on the same code-line In the case of two and three they are on a different line. Now, with the

Re: Python 2 vs Python 3 for teaching

2015-11-02 Thread Chris Angelico
On Tue, Nov 3, 2015 at 12:15 AM, beliavsky--- via Python-list wrote: > I think Python 2.x is still used more than Python 3.x in scientific > computing. The Python books I have in this area, such as "Python for Finance: > Analyze Big Financial Data" and "Python for Data

Re: same problem even after repair

2015-11-02 Thread Sibylle Koczian
Am 02.11.2015 um 13:35 schrieb Daniel Joffe: Didn't you see the answers to your first posting? All of them earlier than this. Sibylle -- https://mail.python.org/mailman/listinfo/python-list

Re: help

2015-11-02 Thread Ian Kelly
On Nov 2, 2015 7:31 AM, "Gabe Clark" wrote: > > i am currently running python 3.5 in my programming class and when ever i > go to open one of my saved files or a file saved by some one else this new > tab pops up and says modify, repair, or uninstall i have uninstalled

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-11-02 Thread Eric V. Smith
Eric V. Smith added the comment: Right, they're the same because it's a single bit. You 'and' with a mask to get the bits you want, and you 'or' together the values. It's an old habit left over from my bit-twiddling days. I guess the test could really be: have_fmt_spec = (oparg & FVS_MASK)

[issue25495] binascii documentation incorrect

2015-11-02 Thread R. David Murray
R. David Murray added the comment: Add a parenthetical "(57 bytes of the input per line)" and I'll be happy with that. -- ___ Python tracker ___

[issue25495] binascii documentation incorrect

2015-11-02 Thread Mouse
Mouse added the comment: And even those constraints depend on the use. E.g. X.509 does not have those. -- ___ Python tracker ___

Re: Python 2 vs Python 3 for teaching

2015-11-02 Thread beliavsky--- via Python-list
I think Python 2.x is still used more than Python 3.x in scientific computing. The Python books I have in this area, such as "Python for Finance: Analyze Big Financial Data" and "Python for Data Analysis", still use Python 2.x . An aspiring computational scientist, data scientist, or financial

Re: GoPiGo script

2015-11-02 Thread hakugin . gin
On Monday, November 2, 2015 at 9:28:35 AM UTC-5, input/ld...@casema.nl wrote: > He mike, > > Thank you or making this script. > Only I get errors for sleep. > I also tried to change it to time.sleep() but that also gives errors. > > File "test05.py", line 23 > sleep(2) > ^ >

Re: GoPiGo script

2015-11-02 Thread input/ldompeling
I tried to use def loop(): now for to restart the script. but its only restart "fwd()" print ("forward 1x") and then stop. It does not look further for the if function. Is there another way to restart this script ? I also tried with (while True:) but that does nothing. Thanks

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-11-02 Thread Eric V. Smith
Eric V. Smith added the comment: Some formatting improvements. I removed one of the optimizations I was doing, because it's also done in PyObject_Format(). I plan on moving other optimizations into PyObject_Format(), but I'll open a separate issue for that. I swapped the order of the

[issue25523] Correct "a" article to "an" article

2015-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin for your review. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread R. David Murray
R. David Murray added the comment: I don't see a link to a greenlet issue, and setuptools is not maintained as part of the stdlib. It sounds like we should close this until and if the greenlet project can point us to a specific problem with the stdlib distutils. -- resolution: ->

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Kracekumar Ramaraj
Kracekumar Ramaraj added the comment: I have created an issue in setuptools repo: https://bitbucket.org/pypa/setuptools/issues/455/unable-to-build-extension-in-python-35. -- ___ Python tracker

[issue25495] binascii documentation incorrect

2015-11-02 Thread Mouse
Mouse added the comment: Let's not insinuate anything about the input. This is about what constraints on the OUTPUT MAY be there, not a tutorial from the 80-ties on how one might accomplish it. -- ___ Python tracker

Re: GoPiGo script

2015-11-02 Thread hakugin . gin
On Monday, November 2, 2015 at 10:21:46 AM UTC-5, MRAB wrote: > On 2015-11-02 14:28, input/ldom...@casema.nl wrote: > > He mike, > > > > Thank you or making this script. > > Only I get errors for sleep. > > I also tried to change it to time.sleep() but that also gives errors. > > > > File

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
New submission from Sean Wang: I transfered a file from remote Debian host to my local Windows 10 host using SecureFX. I found that the file's last modifed date was ‎1900‎/‎1‎/1‎,‏‎0:00:00 on Windows. I tried to serve this file to be downloaded, and it crashed as follows: Exception happened

[issue25533] Make pkgutil.iter_modules() yield built-in modules

2015-11-02 Thread R. David Murray
R. David Murray added the comment: IMO, definitely this should not be changed by default. An alternative to a boolean flag would be a new function (iter_all_modules?). -- nosy: +r.david.murray ___ Python tracker

help

2015-11-02 Thread Gabe Clark
i am currently running python 3.5 in my programming class and when ever i go to open one of my saved files or a file saved by some one else this new tab pops up and says modify, repair, or uninstall i have uninstalled and repaired it multiple times to no success please help --

Re: GoPiGo script

2015-11-02 Thread input/ldompeling
He mike, Thank you or making this script. Only I get errors for sleep. I also tried to change it to time.sleep() but that also gives errors. File "test05.py", line 23 sleep(2) ^ SyntaxError: invalid syntax

Re: GoPiGo script

2015-11-02 Thread MRAB
On 2015-11-02 14:28, input/ldompel...@casema.nl wrote: He mike, Thank you or making this script. Only I get errors for sleep. I also tried to change it to time.sleep() but that also gives errors. File "test05.py", line 23 sleep(2) ^ SyntaxError: invalid syntax

[issue25193] itertools.accumulate should have an optional initializer argument

2015-11-02 Thread Alun Champion
Alun Champion added the comment: Understandable, though it would have also made the first order recurrence relationships more accurate, e.g. annualized interest on an initial balance: accumulate(repeat(None), lambda: bal, _: bal*1.05, initializer=1000) vs. artificially repeating 1000:

[issue25533] Make pkgutil.iter_modules() yield built-in modules

2015-11-02 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25495] binascii documentation incorrect

2015-11-02 Thread R. David Murray
R. David Murray added the comment: Please take a look at the Examples section of this: http://perldoc.perl.org/MIME/Base64.html Looks kind of like Martin's suggestion :) -- ___ Python tracker

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that FVS_MASK and FVS_HAVE_SPEC are duplicates. FVS_HAVE_SPEC is set but FVS_MASK is tested. -- ___ Python tracker

[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: The difference lies in the line numbers. When tracing lines, the interpreter operates on the basis of physical lines, not logical lines (https://docs.python.org/3/reference/lexical_analysis.html#line-structure). The local trace function is called on the

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Sean Wang
Sean Wang added the comment: upload a sample test file -- Added file: http://bugs.python.org/file40929/test ___ Python tracker ___

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-11-02 Thread Stefan Krah
Stefan Krah added the comment: The MASK idiom is nice and I think it's good to be exposed to it from time to time. -- nosy: +skrah ___ Python tracker ___

[issue25523] Correct "a" article to "an" article

2015-11-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75df8b0a2cd1 by Serhiy Storchaka in branch '3.4': Issue #25523: Further a-to-an corrections. https://hg.python.org/cpython/rev/75df8b0a2cd1 New changeset 68edc7baeef7 by Serhiy Storchaka in branch '3.5': Issue #25523: Merge a-to-an corrections from

same problem even after repair

2015-11-02 Thread Daniel Joffe
-- https://mail.python.org/mailman/listinfo/python-list

need help understanding a python program

2015-11-02 Thread Lee Bradley
http://pastebin.com/ndDYjYe1 The above link takes you to a very interesting way of solving the classic game of Bulls and Cows. It uses an entropy-based decision algorithm. I realize this is asking a lot but I am not yet proficient enough in python to follow some of the methods. There is a

[issue25536] use sys.platform instead of os.name in asyncio docs consistently

2015-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds good. I'll commit this. -- ___ Python tracker ___ ___

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Ned Deily
Changes by Ned Deily : -- Removed message: http://bugs.python.org/msg253937 ___ Python tracker ___

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Ned Deily
Ned Deily added the comment: As David notes, this issue does not document any problems with Python 3.5 itself. I see at least two issues here. One, you are using virtualenv, a third-party package, rather than Python's built-in venv. It appears that the most recent release of virtualenv on

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread R. David Murray
R. David Murray added the comment: This indeed looks like a bug to me, but I won't be surprised if Raymond says it was done on purpose. On the other hand originally the binary operator mothods didn't correctly return NotImplemented for non-Counters, so perhaps it is just an oversight. I'm

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Ned Deily
Ned Deily added the comment: As David notes, this issue does not document any problems with Python 3.5 itself. I see at least two issues here. One, you are using virtualenv, a third-party package, rather than Python's built-in venv. It appears that the most recent release of virtualenv on

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread Mark Dickinson
Mark Dickinson added the comment: I'm fairly sure that this behaviour is deliberate, and (more-or-less) consistently applied throughout the builtin and standard library types. If you create a subclass C of list, then concatenation of two instances of C still gives a result of type list.

[issue24306] Backport py.exe to 3.4

2015-11-02 Thread Steve Dower
Steve Dower added the comment: So with the 3.5 launcher being installed all-users by default, the attached patch is a good option. I'm not able to build 3.4 entirely, but I made the modification to the MSI directly and it works fine, so I intend to go ahead and apply it (with some extra line

Re: need help understanding a python program

2015-11-02 Thread Ben Finney
Lee Bradley writes: > http://pastebin.com/ndDYjYe1 We much prefer to discuss code in the context of plain text messages right here, because this forum is archived longer than the expected lifetime of content hosted on other services. > For now I am looking for

Re: Modern recommended exception handling practices?

2015-11-02 Thread Steven D'Aprano
Hi Vasudev, and welcome. Sorry for the delay in replying to your questions. My answers inline, below. On Fri, 30 Oct 2015 04:43 am, vasudevram wrote: > Are there any modern (i.e. for current versions of Python 2 and 3) > recommended exception handling practices? When you say "modern", it

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Changing PyObject_Repr is too course; it affects a broad class of objects other than containers, and it risks unknown impacts to larges swaths of third-party code use this venerable API. It is also a break with the long established history of recursion

Re: Unbuffered stderr in Python 3

2015-11-02 Thread Nobody
On Mon, 02 Nov 2015 18:52:55 +1100, Steven D'Aprano wrote: > In Python 2, stderr is unbuffered. > > In most other environments (the shell, C...) stderr is unbuffered. > > It is usually considered a bad, bad thing for stderr to be buffered. What > happens if your application is killed before the

[issue25540] virtual conf file encoding error on windows

2015-11-02 Thread tanbro
New submission from tanbro: When create a new `venv` on windows, sometimes an `UnicodeDecodeError` occurred. It seems that, it is caused by the system module `site`. In `Lib/site.py`, line 468:: with open(virtual_conf) as f: for line in f: line =

Re: Modern recommended exception handling practices?

2015-11-02 Thread Chris Angelico
On Tue, Nov 3, 2015 at 5:47 PM, Steven D'Aprano wrote: > On Fri, 30 Oct 2015 04:43 am, vasudevram wrote: > >> Are there any modern (i.e. for current versions of Python 2 and 3) >> recommended exception handling practices? > > When you say "modern", it sounds like you want to

Re: Modern recommended exception handling practices?

2015-11-02 Thread Chris Angelico
On Tue, Nov 3, 2015 at 6:22 PM, Steven D'Aprano wrote: > A lot can happen in the few microseconds between > checking for the existence of the file and actually opening it -- the file > could be renamed or deleted. And a lot of microseconds can happen between two opcodes,

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one example: >>> import io >>> class BR(io.BufferedReader): ... @property ... def name(self): ... return self ... >>> repr(BR(io.BytesIO())) Segmentation fault The same is for other file-like objects. --

Re: Regular expressions

2015-11-02 Thread Steven D'Aprano
On Tue, 3 Nov 2015 03:23 pm, ru...@yahoo.com wrote: > Regular expressions should be learned by every programmer or by anyone > who wants to use computers as a tool.  They are a fundamental part of > computer science and are used in all sorts of matching and searching > from compilers down to your

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I created a simple gist that can show the problem: https://gist.github.com/snaury/ea167713b1804ffbaf5a (testme.sh builds Python 3.5, creates a venv, install greenlet and tries to compile an extension) -- ___

Re: GoPiGo script

2015-11-02 Thread Robin Koch
Am 02.11.2015 um 15:32 schrieb input/ldompel...@casema.nl: Thank you for the explanation for it. I must tell you that i yust beginning with python. I bought the book beginning programming with python. Have you programming experience with other languages? Well, the very first thing you

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: I have reproduced this problem on Linux with pyvenv, isn't that part of Python 3.5? -- ___ Python tracker ___

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread R. David Murray
R. David Murray added the comment: OK, good point. Perhaps we should turn this into a feature request to replace the calls to Counter with a call to an overridable method to make subclassing in this way possible without massive cut and paste. --

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread Mark Dickinson
Mark Dickinson added the comment: Relevant post from Tim Peters back in 2005, on the subject of subclassing datetime and timedelta: """ Yes, and all builtin Python types work that way. For example, int.__add__ or float.__add__ applied to a subclass of int or float will return an int or float;

ANN: numexpr 2.4.6 released

2015-11-02 Thread Francesc Alted
Hi, This is a quick release fixing some reported problems in the 2.4.5 version that I announced a few hours ago. Hope I have fixed the main issues now. Now, the official announcement: = Announcing Numexpr 2.4.6 = Numexpr is a fast numerical

ANN: np_utils 0.4

2015-11-02 Thread David N. Mashburn
Announcing np_utils version 0.4 Github: https://github.com/davidmashburn/np_utils Bitbucket: https://bitbucket.org/davidmashburn/np_utils PyPI: https://pypi.python.org/pypi/np_utils np_utils is a growing collection of succinct but powerful utility functions focused around extending numpy in

[issue25083] Python can sometimes create incorrect .pyc files

2015-11-02 Thread tzickel
tzickel added the comment: 1. You are correct the issue I am talking about is in parsing source files (Altough because python caches them as .pyc it's a worse situation). 2. The example you give is EINTR handling (which is mostly handling interrupted I/O operations by signals and retrying

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2015-11-02 Thread Nir Soffer
Changes by Nir Soffer : -- nosy: +haypo, pitrou ___ Python tracker ___ ___ Python-bugs-list

Re: How to handle exceptions properly in a pythonic way?

2015-11-02 Thread John Gordon
In <4b303213-62e2-42d4-b2f6-4fc1f6025...@googlegroups.com> zljubi...@gmail.com writes: > Let's say that I have the following simple function: > def get_html(url): > wpage = requests.get(url) > > return wpage.text > How to handle exceptions properly that can arise during execution

How to handle exceptions properly in a pythonic way?

2015-11-02 Thread zljubisic
Let's say that I have the following simple function: def get_html(url): wpage = requests.get(url) return wpage.text How to handle exceptions properly that can arise during execution of the requests.get(url)? If I call this function with try: html =

[issue25539] python3 fail on parsing http header

2015-11-02 Thread 신동원
New submission from 신동원: I tried to login some website using requests session, but it failed because of parsing header. This is header data of problem. It contains two line of continuous CRLF between the data. Date: Mon, 02 Nov 2015 08:45:48 GMT Server: Apache/2.2.20 (Unix) mod_ssl/2.2.20

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Kracekumar Ramaraj
Kracekumar Ramaraj added the comment: Updating wheel to latest version fixed assertion issue but uwsgi installation still fails. Virtualenv has updated to latest whhel version https://github.com/pypa/virtualenv/blob/develop/virtualenv_support/wheel-0.26.0-py2.py3-none-any.whl. Also, my

Re: Modern recommended exception handling practices?

2015-11-02 Thread Steven D'Aprano
On Tue, 3 Nov 2015 06:16 pm, Chris Angelico wrote: > Not to mention having race condition possibilities. Arrggghhh! I knew there was something else I wanted to say. You're right. Sometimes you *have* to use exception handling code. Take this for example: if os.path.exists(pathname): f =

Re: python doesn't install

2015-11-02 Thread Dave Farrance
Tim Golden wrote: >I'm afraid you've been bitten by the fact that we no longer support >Windows XP and haven't communicated this very well. We have a new >version of the installer almost ready for release which indicates this >much earlier (and more obviously). I'm

Re: python doesn't install

2015-11-02 Thread Tim Golden
On 02/11/2015 06:16, Tim Golden wrote: > On 02/11/2015 00:08, Daniel Joffe wrote: >> WinXP...32 bits...professional >> >> I keep getting message >> >> >> note also that there is no place on the install box to start...you just >> click somewhere, and the install started. >> > > I'm afraid you've

[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-02 Thread Fred Gansevles
Fred Gansevles added the comment: Xavier, thanks for looking at my post. But, since all six invocations of the context manager are the same - I did an 'ast.parse' and 'ast.dump' and the the six calls were *exactly* the same (save lineno and col_offset) - why does 'zero', 'one', 'four' and

Unbuffered stderr in Python 3

2015-11-02 Thread Steven D'Aprano
In Python 2, stderr is unbuffered. In most other environments (the shell, C...) stderr is unbuffered. It is usually considered a bad, bad thing for stderr to be buffered. What happens if your application is killed before the buffer fills up? The errors in the buffer will be lost. So how come

[issue25495] binascii documentation incorrect

2015-11-02 Thread Mouse
Mouse added the comment: 1. I am OK with the following text, modeling referred Perldoc: b2a_base64( $bytes, $eol ); Encode data by calling the encode_base64() function. The first argument is the byte string to encode. The second argument is optional, and provides the line-ending sequence to

Re: installer user interface glitch ?

2015-11-02 Thread rurpy--- via Python-list
On Sunday, November 1, 2015 at 2:48:58 PM UTC-7, Laura Creighton wrote: > Actually, adding the XP - do not look here -- > message for several webpages has been on the pydotorg > todo list for more than a week now. > > Not sure why it hasn't happened. > > Thank you for the reminder. You're

RE: Puzzled

2015-11-02 Thread Robinson, Wendy
[cid:image001.png@01D11543.5ED11D50] Wendy Robinson Audit Analyst (916) 566-4994 phone NOTICE OF CONFIDENTIALITY: This email is for the sole use of the intended recipient and may contain material that is confidential and protected by state and federal regulations. If you are not the

[issue25536] use sys.platform instead of os.name in asyncio docs consistently

2015-11-02 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed in 3.4, 3.5, 3.6 by these commits: 193327cabbbc, e2400d5d67e7, 40ce5f4b8835. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue25533] Make pkgutil.iter_modules() yield built-in modules

2015-11-02 Thread Brett Cannon
Brett Cannon added the comment: How would this handle frozen modules? -- ___ Python tracker ___ ___

[issue25535] collections.Counter methods return Counter objects

2015-11-02 Thread Rob Malouf
New submission from Rob Malouf: Several collections.Counter methods return Counter objects, which is leads to wrong or at least confusing behavior when Counter is subclassed. For example, nltk.FreqDist is a subclass of Counter: >>> x = nltk.FreqDist(['a','a','b','b','b']) >>> y =

[issue25536] use sys.platform instead of os.name in asyncio docs consistently

2015-11-02 Thread Akira Li
New submission from Akira Li: asyncio code uses "sys.platform == 'win32'" to detect OS. asyncio docs use both os.name and sys.platform. As far as I can tell there is no *practical* difference between "os.name == 'nt" and "sys.platform == 'win32'" for choosing asyncio.ProactorEventLoop() I've

[issue25531] greenlet header file is missing inside virtualenv

2015-11-02 Thread Ned Deily
Ned Deily added the comment: Alexey, thanks for the simplified test case. I'll look at it further. -- resolution: third party -> stage: resolved -> status: closed -> open ___ Python tracker

[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-11-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

Re: How to handle exceptions properly in a pythonic way?

2015-11-02 Thread Ian Kelly
On Mon, Nov 2, 2015 at 12:24 PM, wrote: > I have read some articles that returning None is not a good approach, so I am > confused. > > How to handle exceptions properly in a pythonic way? I'm having a hard time understanding what question you're asking. You have a lot of

Re: GoPiGo script

2015-11-02 Thread Larry Hudson via Python-list
On 11/02/2015 11:31 AM, Robin Koch wrote: Am 02.11.2015 um 15:32 schrieb input/ldompel...@casema.nl: Thank you for the explanation for it. I must tell you that i yust beginning with python. I bought the book beginning programming with python. Have you programming experience with other

[issue25537] Call `isinstance` instead of `issubclass` during exception handling

2015-11-02 Thread Sjoerd Job Postmus
New submission from Sjoerd Job Postmus: Currently Python2.7 calls `PyObject_IsSubclass` during exception handling. This allows some virtual-base-class machinery to make Python believe a certain class should match an exception while it in reality does not. However, this does not necessarily

Nikola v7.7.3 is out!

2015-11-02 Thread Chris Warrick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.3. It fixes some bugs and adds new features. What is Nikola? === Nikola is a static site and blog generator, written in Python. It can use

[ANN] Python 3 Cheat Sheet v2.0

2015-11-02 Thread Laurent Pointal via Python-announce-list
Hello, I just updated my one recto-verso sheet Python 3 Cheat Sheet https://perso.limsi.fr/pointal/python:memento Many modifications and enhancements (bytes, literal ints, assignment complement, conversion tricks, cleaning sequences indexing, complement on boolean logic, modules

Re: python doesn't install

2015-11-02 Thread Chris Warrick
On 2 November 2015 at 09:28, Dave Farrance wrote: > Yes, I've read the justifications. Why list all the non-supported OSs? > And the explanation about each version of Python being supported just > for the supported versions of Windows upon its release is in the >

[issue25523] Correct "a" article to "an" article

2015-11-02 Thread Martin Panter
Martin Panter added the comment: Thanks Serhiy. My pass over the files missed most cases where there was a line break involved, and certain punctuation and markup, which you picked up on. I skipped the /Lib/msilib/schema.py file in my patch because it was part of the data rather than a

[issue24379] operator.subscript

2015-11-02 Thread Martin Panter
Martin Panter added the comment: On the mailing list, Antoine also suggested removing __slots__ completely as another workaround. I agree that it doesn’t seem important for a singleton, though in the review comments a couple people seemed to want __slots__. --

ANN: numexpr 2.4.5 released

2015-11-02 Thread Francesc Alted
= Announcing Numexpr 2.4.5 = Numexpr is a fast numerical expression evaluator for NumPy. With it, expressions that operate on arrays (like "3*a+4*b") are accelerated and use less memory than doing the same calculation in Python. It wears

[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Xavier. I guess the lesson is that physical line tracing works best (and most as one would hope or expect) when physical lines are logical lines (or compound statement header lines). -- resolution: -> not a bug stage: test needed ->

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue25534] SimpleHTTPServer throwed an exception due to negtive st_mtime attr in file

2015-11-02 Thread Martin Panter
Martin Panter added the comment: I think your test file’s time is lost on the web server. On Linux it is pretty easy to make a file with an arbitrary time; maybe Windows has an equivalent: $ touch -d "1 Jan 1900" test I experimented with Wine, and it seems gmtime() raises ValueError on Python

[issue25498] Python 3.4.3 core dump with simple sample code

2015-11-02 Thread Martin Panter
Martin Panter added the comment: I tend to agree with Serhiy about Eryksun’s patch. I understand it solves the current problem, and continues to protect against this scenario: >>> b = bytearray(b"a") >>> c = ctypes.c_char.from_buffer(b) >>> b *= 1000 BufferError: Existing exports of data:

[issue25538] Traceback from __exit__ method is misleading

2015-11-02 Thread R. David Murray
New submission from R. David Murray: This is at least the second time that I've wasted a bunch of debugging time being mislead by the traceback from __exit__. Perhaps I will remember from now on, but...I wonder if it would be possible/practical to improve the situation. The problem is that

Re: Detection of a specific sound

2015-11-02 Thread Lorenzo Sutton
On 26/10/15 01:17, Montana Burr wrote: I'm looking for a library that will allow Python to listen for the shriek of a smoke alarm. Once it detects this shriek, it is to notify someone. Ideally, specificity can be adjusted for the user's environment. For example, I expect to need moderate

[issue25535] collections.Counter methods return Counter objects instead of subclass objects

2015-11-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: The decision was deliberate and matches what we've done elsewhere in Python. The nearest kin to Counters are sets/frozensets which also behave the same way: >>> class S(set): pass >>> type(S('abc') | S('cdef')) Mark Dickinson

[issue25537] Call `isinstance` instead of `issubclass` during exception handling

2015-11-02 Thread R. David Murray
R. David Murray added the comment: This does not sound like the kind of change we would accept for python 2.7. (I also don't understand what the difference is between calling issubclass on the type and isinstance on the instance in this case. But, then, I haven't looked at the code in

Re: Unbuffered stderr in Python 3

2015-11-02 Thread Wolfgang Maier
On 02.11.2015 11:48, Wolfgang Maier wrote: Since Python3.3, the print function has a flush keyword argument that accepts a boolean and lets you do just this. Rewrite your example as: import sys, time def test(): # Simulate a slow calculation that prints status and/or error # messages to

Re: Unbuffered stderr in Python 3

2015-11-02 Thread Wolfgang Maier
On 02.11.2015 08:52, Steven D'Aprano wrote: In Python 2, stderr is unbuffered. In most other environments (the shell, C...) stderr is unbuffered. It is usually considered a bad, bad thing for stderr to be buffered. What happens if your application is killed before the buffer fills up? The

Re: Problem in implementing Romania Map using Paython Script

2015-11-02 Thread Terry Reedy
On 11/2/2015 12:45 AM, Ben Finney wrote: amn...@gmail.com writes: I need a help in completing the Class Roaming problem using Euclidean function , Completing the Class Node . I think you need to research how to solve this algorithm, and only *then* think about how to code it in Python.

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2015-11-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Robin. The patch needs a test case. See Lib/test/test_posixpath.py. The test coverage of ismount() is not high, so we need more tests. Also, I don't have much time to work on this right now, but Antoine's suggestion in msg71294 sounds

[issue25533] Make pkgutil.iter_modules() yield built-in modules

2015-11-02 Thread Martin Panter
New submission from Martin Panter: When no specific list of paths are given, pkgutil.iter_modules() and walk_packages() will list modules found on sys.path. But they don’t list built-in modules, which don’t live in a particular directory. So many users of these APIs (such as the ModuleScanner

  1   2   >