Re: adding type hints to one of my projects, things learned

2017-05-26 Thread Steve D'Aprano
On Thu, 25 May 2017 08:37 am, Irmen de Jong wrote: > Hi, > > I wanted to share my experience with adding type hints to one of my > projects. Thanks for the write-up! [...] > Right now, I am not really sure if I want to continue to use type hints. > In Tale I probably will because it now has

Re: Check for regular expression in a list

2017-05-26 Thread Jussi Piitulainen
Rustom Mody writes: > On Friday, May 26, 2017 at 5:02:55 PM UTC+5:30, Cecil Westerhof wrote: >> To check if Firefox is running I use: >> if not 'firefox' in [i.name() for i in list(process_iter())]: >> >> It probably could be made more efficient, because it can stop

[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2017-05-26 Thread Louie Lu
Louie Lu added the comment: We can solve this problem by two ways. One is to add set_line_and_column() to the end of goto_line_event(), but this will make Return trigger set_line_and_column twice. Another is to change the bind event in simpledialog from "" to "" to prevent editor use the

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Steve D'Aprano
On Thu, 25 May 2017 11:26 am, Chris Angelico wrote: > On Thu, May 25, 2017 at 9:34 AM, bartc wrote: >> That was quite likely with older Fortrans, where subroutines only used >> pass-by-reference, but which didn't stop you passing references to >> constants that the subroutine

Re: Check for regular expression in a list

2017-05-26 Thread Tim Chase
On 2017-05-26 13:29, Cecil Westerhof wrote: > To check if Firefox is running I use: > if not 'firefox' in [i.name() for i in list(process_iter())]: > > It probably could be made more efficient, because it can stop when > it finds the first instance. > > But know I switched to Debian and

Re: Check for regular expression in a list

2017-05-26 Thread Jussi Piitulainen
Jussi Piitulainen writes: > Or use a regex match if the condition becomes more complex. Even then, > there is re.match to attemp a match at the start of the string, which > helps to keep the expression simple. Soz: attemp' a match. -- https://mail.python.org/mailman/listinfo/python-list

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Ben Wainwright
New submission from Ben Wainwright: The findall method for ElementTree.Element handles namespace prefixes by tokenising the path and inserting the full namespace in braces based on entries in a dictionary. Unfortunately, this does not work for a namespace without a prefix, so if you have

Check for regular expression in a list

2017-05-26 Thread Cecil Westerhof
To check if Firefox is running I use: if not 'firefox' in [i.name() for i in list(process_iter())]: It probably could be made more efficient, because it can stop when it finds the first instance. But know I switched to Debian and there firefox is called firefox-esr. So I should use:

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-26 Thread Tim Williams
On Friday, May 26, 2017 at 8:32:19 AM UTC-4, Tim Williams wrote: > On Thursday, May 25, 2017 at 9:43:40 PM UTC-4, Tim Williams wrote: > > On Thursday, May 25, 2017 at 5:16:13 PM UTC-4, Peter Otten wrote: > (snip) > > > ... > > > > > > How do you get > > > > > > > LogFile =

[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-05-26 Thread Jim Wright
New submission from Jim Wright: We discovered this issue whilst using h5py (HDF5 python library) under python 3.5.2 on Ubuntu 16.04.2 x86_64. The construct used is very dubious, and I will separately be raising an issue with the h5py team. However I thought you might like to know there is a

[issue30477] tuple.index error message improvement

2017-05-26 Thread Martin Panter
Martin Panter added the comment: Also discussed in Issue 13349 -- nosy: +martin.panter superseder: -> Non-informative error message in index() and remove() functions ___ Python tracker

EuroPython 2017: Full session list online

2017-05-26 Thread M.-A. Lemburg
After the final review round, we are now happy to announce the complete list of more than 200 accepted sessions. * EuroPython 2017 Session List * https://ep2017.europython.eu/en/events/sessions/ Here’s what we have on offer: - 5 keynotes - 157 talks - 20

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Chris Angelico
On Fri, May 26, 2017 at 10:52 PM, Rustom Mody wrote: >> Can you explain to me how it's different? Either way, the >> implementation is allowed to do what it likes, because you shouldn't >> be doing that. > > I am guessing that Steven is mixing up undefined and unspecified

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Rustom Mody
On Friday, May 26, 2017 at 7:11:50 PM UTC+5:30, Chris Angelico wrote: > On Fri, May 26, 2017 at 10:52 PM, Rustom Mody wrote: > >> Can you explain to me how it's different? Either way, the > >> implementation is allowed to do what it likes, because you shouldn't > >> be doing that. > > > > I am

[issue24484] multiprocessing cleanup occasionally throws exception

2017-05-26 Thread Marcin Słowik
Marcin Słowik added the comment: I can confirm, I have managed to accidentally reproduce this issue on a custom build of 3.6.0 on RHEL. sys.version: '3.6.0 (default, Jan 18 2017, 11:23:11) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]' The issue popped out of nowhere, on a code that was working

Re: Check for regular expression in a list

2017-05-26 Thread Cecil Westerhof
On Friday 26 May 2017 14:25 CEST, Jussi Piitulainen wrote: > Rustom Mody writes: > >> On Friday, May 26, 2017 at 5:02:55 PM UTC+5:30, Cecil Westerhof wrote: >>> To check if Firefox is running I use: >>> if not 'firefox' in [i.name() for i in list(process_iter())]: >>> >>>

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread bartc
On 26/05/2017 12:46, Steve D'Aprano wrote: On Thu, 25 May 2017 11:26 am, Chris Angelico wrote: And why should they try to stop you? The whole point of undefined behaviour is that you shouldn't be doing this, so if you do, the interpreter's allowed to do anything. Does the C specification

Re: Check for regular expression in a list

2017-05-26 Thread Rustom Mody
On Friday, May 26, 2017 at 5:02:55 PM UTC+5:30, Cecil Westerhof wrote: > To check if Firefox is running I use: > if not 'firefox' in [i.name() for i in list(process_iter())]: > > It probably could be made more efficient, because it can stop when it > finds the first instance. > > But know I

Re: Check for regular expression in a list

2017-05-26 Thread Rustom Mody
On Friday, May 26, 2017 at 5:55:32 PM UTC+5:30, Jussi Piitulainen wrote: > Rustom Mody writes: > > > On Friday, May 26, 2017 at 5:02:55 PM UTC+5:30, Cecil Westerhof wrote: > >> To check if Firefox is running I use: > >> if not 'firefox' in [i.name() for i in list(process_iter())]: > >> > >>

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Chris Angelico
On Fri, May 26, 2017 at 9:46 PM, Steve D'Aprano wrote: > >> And yes, Steve, this is a challenge to you: if you think C's undefined >> behaviour is an abomination that should not be allowed to exist, > > CPython doesn't have to define the behaviour here. In *that*

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Rustom Mody
On Friday, May 26, 2017 at 5:31:54 PM UTC+5:30, Chris Angelico wrote: > On Fri, May 26, 2017 at 9:46 PM, Steve D'Aprano wrote: > > > >> And yes, Steve, this is a challenge to you: if you think C's undefined > >> behaviour is an abomination that should not be allowed to exist, > > > > CPython

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Rhodri James
On 26/05/17 12:46, Steve D'Aprano wrote: On Thu, 25 May 2017 11:26 am, Chris Angelico wrote: On Thu, May 25, 2017 at 9:34 AM, bartc wrote: That was quite likely with older Fortrans, where subroutines only used pass-by-reference, but which didn't stop you passing references

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2017-05-26 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: See http://bugs.python.org/issue30477 for why I think this shouldn't be done. In short, the IndexError may be part of control flow (looping over successive matches) rather than an error (this patch adds a time/space cost with no benefit in those cases).

[issue30486] Allow setting cell value

2017-05-26 Thread Antoine Pitrou
New submission from Antoine Pitrou: There are use cases for setting a cell value. One such use case is for (un)pickling recursive closures (see heroic workaround here: https://github.com/cloudpipe/cloudpickle/pull/90/files#diff-d2a3618afedd4e124c532151eedbae09R74 ). Other use cases may

[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: A while ago, Eric Appelt stepped forward to help with the asyncio documentation. Here's my response to his email in which we discuss the direction for the new docs. On May 24, 2017 at 1:04:56 PM, Eric Appelt (eric.app...@gmail.com) wrote: > Hi Yury, > > I

[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-26 Thread Eric Appelt
Changes by Eric Appelt : -- nosy: +Eric Appelt ___ Python tracker ___ ___

[issue30433] Devguide lacks instructions for building docs

2017-05-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks Caleb. This has been addressed in the Dev Guide PR https://github.com/python/devguide/pull/206 and it has been merged. -- nosy: +Mariatta resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.7

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-05-26 Thread Caleb Hattingh
New submission from Caleb Hattingh: Under guidance from zware during Pycon sprints, I've changed the Doc/ Makefile to automatically create a virtual environment and install Sphinx, all as part of the `make html` command. -- assignee: docs@python components: Documentation messages:

[issue30479] improve asyncio debugging

2017-05-26 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

Open this XML file to create dataframe in Python

2017-05-26 Thread Umar Yusuf
Hello, How do I open this XML file to create Python pandas dataframe? https://www.dropbox.com/s/83e9r36z39zj8ve/sample.xml?dl=0 https://www.dropbox.com/home?preview=sample.xml -- https://mail.python.org/mailman/listinfo/python-list

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-26 Thread Peter Otten
Tim Williams wrote: > I've spent too much time trying to track this down. I'll just hard-code my > filename in my INI file. Maybe I'll get back to it, but I need to move on. The only alternative I see would be to build your own InterpolationEngine which understands some kind of escaping so that

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-05-26 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___

[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2017-05-26 Thread Barry Davis
Changes by Barry Davis : -- versions: +Python 3.6 ___ Python tracker ___ ___

Re: Check for regular expression in a list

2017-05-26 Thread Peter Otten
Jussi Piitulainen wrote: > Surely that should be: > > if not 'firefox' in (i.name() for i in process_iter()): > > And that again should be: > > if any((i.name() == 'firefox') for i in process_iter()): The previous one certainly looks better than this, particularly if you move the

[issue30433] Devguide lacks instructions for building docs

2017-05-26 Thread Caleb Hattingh
Caleb Hattingh added the comment: The PR has been merged by Mariatta so I think this can be closed. -- ___ Python tracker ___

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-26 Thread Tim Williams
On Friday, May 26, 2017 at 8:37:38 AM UTC-4, Tim Williams wrote: > On Friday, May 26, 2017 at 8:32:19 AM UTC-4, Tim Williams wrote: > > On Thursday, May 25, 2017 at 9:43:40 PM UTC-4, Tim Williams wrote: > > > On Thursday, May 25, 2017 at 5:16:13 PM UTC-4, Peter Otten wrote: > > (snip) > > > > ...

[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2017-05-26 Thread Barry Davis
Barry Davis added the comment: I think this is the same issue I'm getting. I'm hitting it when compiling python 3.6.2 compiled with gcc-4.8.4. This wasn't occasional, it was every time I tried. As a feeble workaround I was compiling in parallel, then in serial when it fails, although I'm now

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree that this is a recurring irritant. -- nosy: +eli.bendersky, rhettinger, scoder type: behavior -> enhancement versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel
Stefan Behnel added the comment: Agreed that this should be added. I think the key should be None, though, not the empty string. I attached a quick patch for lxml's corresponding file. It's mostly the same for ET. -- keywords: +patch Added file:

[issue30486] Allow setting cell value

2017-05-26 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue11588] Add "necessarily inclusive" groups to argparse

2017-05-26 Thread Pedro
Pedro added the comment: Just voicing my support for this. I was also looking for a solution on StackOverflow and ended up here. -- nosy: +pgacv2 ___ Python tracker

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Steve D'Aprano
On Fri, 26 May 2017 10:56 pm, Rhodri James wrote: > On 26/05/17 12:46, Steve D'Aprano wrote: >> On Thu, 25 May 2017 11:26 am, Chris Angelico wrote: >> >>> On Thu, May 25, 2017 at 9:34 AM, bartc wrote: That was quite likely with older Fortrans, where subroutines only used

Re: Top Python Interview Questions

2017-05-26 Thread Larry Martell
On Fri, May 26, 2017 at 1:03 AM, Aarusha wrote: > PYTHON INTERVIEW QUESTIONS > > Mindmajix has compiled Python Interview questions which would benefit the > learners to attend the Python interviews. > > Q. How is Python executed? > > Python files are compiled to bytecode.

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Chris Angelico
On Sat, May 27, 2017 at 8:48 AM, Steve D'Aprano wrote: > I don't actually believe that any real compiler will *literally* contain > code that looks like this: > > > if phase_of_moon(now()) != X: > # emit machine code you expected > else: > # erase your hard

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Shubha Ramani
Shubha Ramani added the comment: This is not needed after all jkloth explained. Please feel free to close. -- ___ Python tracker ___

[issue30490] Allow pass an exception to the Event.set method

2017-05-26 Thread pfreixes
Changes by pfreixes : -- pull_requests: +1911 ___ Python tracker ___ ___ Python-bugs-list

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Steve D'Aprano
On Fri, 26 May 2017 10:01 pm, Chris Angelico wrote: >> That's not how the C standard defines "undefined behaviour", or the >> implication of such. > > Can you explain to me how it's different? Either way, the > implementation is allowed to do what it likes, because you shouldn't > be doing that.

[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread wim glenn
Changes by wim glenn : -- pull_requests: +1912 ___ Python tracker ___ ___

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30486] Allow setting cell value

2017-05-26 Thread Lisa Roach
Lisa Roach added the comment: This idea makes sense to me. I'll see if I can put together the code for it. -- nosy: +lisroach ___ Python tracker ___

[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue13349] Non-informative error message in index() and remove() functions

2017-05-26 Thread Brett Cannon
Brett Cannon added the comment: A potential compromise would be if ValueError gained a 'value' attribute. That would allow for the exception message to be static but still provide the information for introspection later if desired to figure out exactly what object led to the cause of the

[issue30463] Add __slots__ to ABC convenience class

2017-05-26 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel
Stefan Behnel added the comment: Patch replaced by pull request. https://github.com/python/cpython/pull/1823 -- ___ Python tracker ___

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1910 ___ Python tracker ___

Where is pydlna-server?

2017-05-26 Thread MoonKid
I have read about a project called "pydlna-server". But it looks like that it is gone. Does anyone know about that project, the source or have contact to the last maintainer. There is an google archive page about it --

[issue30488] Documentation for subprocess.STDOUT needs clarification

2017-05-26 Thread Max
New submission from Max: The documentation states that subprocess.STDOUT is: Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output. However, when Popen is called with stdout=None,

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Shubha Ramani
Shubha Ramani added the comment: It looks like _GenerateCRCTable() is already implemented here: https://svn.python.org/projects/python/trunk/Lib/zipfile.py The question is, why isn't it implemented here ? https://github.com/python/cpython/blob/master/Lib/zipfile.py --

[issue30489] Add CmdLineTest to standard library

2017-05-26 Thread Santiago Castro
New submission from Santiago Castro: I see that you use some helpers to test command line utilities (https://hg.python.org/cpython/file/default/Lib/test/test_cmd_line_script.py) that would be useful to Python programmers. Please, consider to add them to the standard library (or somewhere) to

[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-26 Thread Erik Simmler
Changes by Erik Simmler : -- nosy: +tgecho ___ Python tracker ___ ___ Python-bugs-list

[issue30482] socket.getservbyname(), socket.getservbyport(), socket.getprotobyname() are not threadsafe

2017-05-26 Thread Doug Freed
Doug Freed added the comment: It already checks for gethostbyname_r, but the comments in socketmodule.c mention that configure seems to get it wrong. Those comments are probably old, though, so perhaps that can be revisited as well. -- ___ Python

[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Brett Cannon
Brett Cannon added the comment: I've created https://github.com/python/peps/pull/267 to clarify things a bit better in PEP 42, Dávid . -- ___ Python tracker

[issue30488] Documentation for subprocess.STDOUT needs clarification

2017-05-26 Thread Eryk Sun
Changes by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess.Popen(stderr=STDOUT) fails to redirect subprocess stderr to stdout ___ Python tracker

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2017-05-26 Thread Stefan Behnel
Changes by Stefan Behnel : Removed file: http://bugs.python.org/file46906/lxml_elpath_empty_prefix.patch ___ Python tracker ___

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Jeremy Kloth
Jeremy Kloth added the comment: See bpo-10030 (and pr #550). It removed that function in favor of the current approach. Also, that current code does not generate *every* time, but just once. Note that the computed value is stored in a global cache. -- nosy: +jkloth

[issue22729] `wait` and `as_completed` depend on private api

2017-05-26 Thread Nathaniel Manista
Nathaniel Manista added the comment: gRPC Python is strongly affected by this as well. We use grpc.Future objects (https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio/grpc/__init__.py#L50) to represent RPCs taking place asynchronously. Despite our

[issue11874] argparse assertion failure with brackets in metavars

2017-05-26 Thread paul j3
paul j3 added the comment: Any changes here including the latest pull request might conflict with http://bugs.python.org/issue29553 Argparser does not display closing parentheses in nested mutex groups If someone uses nested mutually exclusive groups (which I don't think they should, but

[issue30486] Allow setting cell value

2017-05-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 I don't see any reason this can't be writeable. -- ___ Python tracker ___

[issue30393] test_readline hangs

2017-05-26 Thread Martin Panter
Martin Panter added the comment: Perhaps if you ran the tests in verbose mode, that could narrow down which test it hangs at. Also, if you can capture a KeyboardInterrupt stack trace, that may help. Not sure if it works with your build setup, but maybe you can run something like ./python -m

[issue30486] Allow setting cell value

2017-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> lisroach ___ Python tracker ___

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Chris Angelico
On Sat, May 27, 2017 at 12:59 PM, Steve D'Aprano wrote: >> What is a standards-compliant Python interpreter allowed to do? > > There's no such thing, so your question is moot. > > There is no Python standard. There's only: > > - do what CPython does; > > - do what the

[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The reason of using bytes concatenating rather than accumulating in the list, is that in most cases one of arguments is an empty bytes object (appending to the empty buffer or uncompressing a file with large compression block), and this case is optimized in

[issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7

2017-05-26 Thread Martin Panter
Martin Panter added the comment: I think the simplest way forward would be to add the word “Unicode” back in. You could look at making a Git Hub pull request for this if you want. Hopefully somebody else can merge it though, because I probably won’t be in a position to do so for a while.

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Steve D'Aprano
On Sat, 27 May 2017 09:36 am, Chris Angelico wrote: > On Sat, May 27, 2017 at 8:48 AM, Steve D'Aprano > wrote: >> I don't actually believe that any real compiler will *literally* contain >> code that looks like this: >> >> >> if phase_of_moon(now()) != X: >> #

Re: Top Python Interview Questions

2017-05-26 Thread Steve D'Aprano
On Sat, 27 May 2017 09:37 am, Chris Angelico wrote: > On Sat, May 27, 2017 at 8:56 AM, Larry Martell > wrote: >> If they write a loop with range(1,10) they are going in the 'no' pile. >> If they write a loop with range(1,11) they go in the maybe pile >> If the write

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Larry Hudson via Python-list
On 05/26/2017 04:46 AM, Steve D'Aprano wrote: [snip..]> That's not how the C standard defines "undefined behaviour", or the implication of such. A little OT here, but... This brings to mind this entry in the Jargon File: http://catb.org/jargon/html/N/nasal-demons.html -- -=- Larry -=-

Re: Top Python Interview Questions

2017-05-26 Thread Chris Angelico
On Sat, May 27, 2017 at 12:19 PM, Steve D'Aprano wrote: > On Sat, 27 May 2017 09:37 am, Chris Angelico wrote: > >> On Sat, May 27, 2017 at 8:56 AM, Larry Martell >> wrote: >>> If they write a loop with range(1,10) they are going in the 'no'

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After some investigations this idea no longer looks good to me. The table of 256 32-bit integers will take at least 44 lines. This is too large. It is easier to check the algorithm than all these numbers. The error even in one digit can break all, but for

[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

Re: using configobj string interpolation and logging.config.dictConfig

2017-05-26 Thread Tim Williams
On Thursday, May 25, 2017 at 9:43:40 PM UTC-4, Tim Williams wrote: > On Thursday, May 25, 2017 at 5:16:13 PM UTC-4, Peter Otten wrote: (snip) > > ... > > > > How do you get > > > > > LogFile = '%(CaptureDrive)s%(RootDir)s/test.log' > > > > to be interpolated while leaving > > > > > format =

Re: Top Python Interview Questions

2017-05-26 Thread Chris Angelico
On Sat, May 27, 2017 at 8:56 AM, Larry Martell wrote: > If they write a loop with range(1,10) they are going in the 'no' pile. > If they write a loop with range(1,11) they go in the maybe pile > If the write sum([i*i for i in range(1,11)]) and sqrt(sum([i for i in >

Re: Sybil 1.0.0 Released!

2017-05-26 Thread Skip Montanaro
On Fri, May 26, 2017 at 2:34 AM, Chris Withers wrote: > The package is on PyPI and a full list of all the links to docs, issue > trackers and the like can be found here: > > https://github.com/cjw96/sybil > Chris, The GitHub URL 404s for me. Skip --

[issue19180] some RFC references could be updated

2017-05-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

Re: Verifiably better, validated Enum for Python

2017-05-26 Thread Steve D'Aprano
On Sat, 27 May 2017 02:20 pm, Chris Angelico wrote: > On Sat, May 27, 2017 at 12:59 PM, Steve D'Aprano > wrote: >>> What is a standards-compliant Python interpreter allowed to do? >> >> There's no such thing, so your question is moot. >> >> There is no Python

[issue22702] to improve documentation for join() (str method)

2017-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: Raymond, I went ahead and accepted the patch to remove the "iterable iterable" phrasing by only referencing the parameter name and dropping the link to the term definition. Do you think that's sufficient to fully resolve the request here, or would you prefer

[issue30444] Add ability to change "-- more --" text in pager module

2017-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: pydoc.pager() is not a public API. This is an internal function of the pydoc module. The stdlib does not have a benefit from adding this feature. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29526] Documenting format() function

2017-05-26 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[issue22702] to improve documentation for join() (str method)

2017-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 08e2f355d04d3cbea5751ce1275306ee3f569b32 by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) https://github.com/python/cpython/commit/08e2f355d04d3cbea5751ce1275306ee3f569b32

[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-26 Thread Shubha Ramani
Shubha Ramani added the comment: Upon comparing the PyPy changes from attached diff to the latest cpython3 github, I don't find a need for improvement. Looks like cpython3 zipfile.py has the same changes and the read() method in class ZipExtFile(io.BufferedIOBase) is vastly improved compared

[issue30490] Allow pass an exception to the Event.set method

2017-05-26 Thread pfreixes
New submission from pfreixes: Having the Event as the way to synchronize 1:N coroutines, the none happy path should be able to be expressed making possible call the `set_exception` for each future related to each waiter. As an example the following code trying to implement a way to avoid the

Sybil 1.0.0 Released!

2017-05-26 Thread Chris Withers
Hi All, I'm pleased to announce the first release of Sybil, a library to help you test the examples in your documents. For example, given the following Sphinx source file: Sample Documentation Let's put something in the Sybil document's namespace: ..

[issue30472] [Selenium 3.4.2-geckodriver 0.16.1] Python 3.6.1 unable to initialize webdriver with "marionette" set to True

2017-05-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is the bug tracker for Python itself. What you're having is an issue with selenium, which is a third-party library. I recommend you post your issue on the selenium bug tracker instead. -- nosy: +pitrou ___

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I could imagine people wanting to build old releases. But we have Windows binaries up here: https://www.python.org/ftp/python/ Therefore I don't think it's a problem to discontinue svn.python.org once new releases are migrated to github (but only once those

[issue30472] [Selenium 3.4.2-geckodriver 0.16.1] Python 3.6.1 unable to initialize webdriver with "marionette" set to True

2017-05-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30477] tuple.index error message improvement

2017-05-26 Thread schen
schen added the comment: What is the rationale for the inconsistency between tuples and lists here? ().index(0) ValueError: tuple.index(x): x not in tuple [].index(0) ValueError: 0 is not in list In this simple artificial case, it seems clear to me that the list version (which is similar to

Re: How to install Python package from source on Windows

2017-05-26 Thread Gregory Ewing
Deborah Swanson wrote: Since none of you have XP SP2 with Anaconda3 Python 3.4.3, to either confirm or deny my results, and I no longer have the message with the traceback showing what happened, nothing anybody says at this point matters wrt to what happens in XP SP2. Have you posted a

[issue30479] improve asyncio debugging

2017-05-26 Thread Tarek Ziadé
New submission from Tarek Ziadé: This is a very useful trick to understand why the loop cleanup generates a lot of "Exception ignored in: " https://github.com/python/asyncio/issues/423#issuecomment-268882753 Could we consider including it in Task.__del__ ? -- components: asyncio

Re: Concatenating files in order

2017-05-26 Thread Mahmood Naderan via Python-list
Thank you very much. I understand that Regards, Mahmood On Friday, May 26, 2017 5:01 AM, Cameron Simpson wrote: On 25May2017 20:37, Mahmood Naderan wrote: >Cameron, thanks for the points. In fact the file name contains multiple '_' >characters.

Re: Top Python Interview Questions

2017-05-26 Thread Steve D'Aprano
On Fri, 26 May 2017 03:32 pm, Terry Reedy wrote: >> Python files are compiled to bytecode. > > CPython compiles to cpython bytecode. > Jython compiles to Java. > Iron Python compiles to C#. Technically, they compile to the JVM byte code and the .Net Common Runtime (I forget the three letter

  1   2   >