[issue22594] Add a link to the regex module in re documentation

2017-02-22 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue27788] platform module's version number doesn't match its docstring

2017-02-22 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: +Python 3.7 ___ Python tracker ___ ___

Re: concurrent futures, async futures and await

2017-02-22 Thread Ian Kelly
On Wed, Feb 22, 2017 at 12:50 PM, Nagy László Zsolt wrote: > > I'm in a situation where I would like to refactor some code to use > native coroutine functions (aync def) instead of "normal" coroutines > that use yield. Most of the code is asnyc, but some of the operations >

Re: any one used moviepy please come in!!! I need help, thanks!

2017-02-22 Thread sntc99
On Thursday, January 26, 2017 at 8:12:24 AM UTC+5:30, Tony Chen wrote: > On Wednesday, January 25, 2017 at 8:34:01 PM UTC+13, Chris Angelico wrote: > > On Wed, Jan 25, 2017 at 6:22 PM, Tony Chen > > wrote: > > > This error can be due to the fact that ImageMagick is

[issue29616] input() after restarting causes bug

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The implementation of standard input/output in IDLE was significantly changed in recent years. -- ___ Python tracker

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread paul j3
paul j3 added the comment: I played around with the patch 117. I was wrong in thinking this was another case of excess brackets being wrongly purged. The fix works by adding ending ] that were missing the original. And it does add a symmetry to the code. But it is easy to construct a set

[issue29629] rgb_to_hls in colorsys.py

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 0.8334 * 360 is equivalent to 300. -- ___ Python tracker ___

[issue29533] urllib2 works slowly with proxy on windows

2017-02-22 Thread Julia Dolgova
Changes by Julia Dolgova : -- pull_requests: +212 ___ Python tracker ___ ___ Python-bugs-list

[issue29629] rgb_to_hls in colorsys.py

2017-02-22 Thread Madhavendra Sharma
Madhavendra Sharma added the comment: Please check examples in en.wikipedia.org/wiki/HSL_and_HSV I picked one of them for R = .750, B=0.250, G=0.750 corresponding HLS value are H= 300 = (5.0 * 60) , L = .5, S=.5 but colorsys.rgb_to_hls(0.75 , 0.25, 0.75) gives following output

[issue29616] input() after restarting causes bug

2017-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Characters typed before Enter are never sent the the execution process, so there are not even interpreted as a string, let alone a command. Do you see exactly the following when you start IDLE? Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC

[issue27788] platform module's version number doesn't match its docstring

2017-02-22 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +211 ___ Python tracker ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread INADA Naoki
INADA Naoki added the comment: AST type doesn't have any information about optional fields. And I don't know it's worth enough to add it. When AST is instantiated by keyword arguments, there are no check about absence of some fields. I suppose we can just loosen positional arguments too.

[issue29533] urllib2 works slowly with proxy on windows

2017-02-22 Thread Julia Dolgova
Julia Dolgova added the comment: I added variable smart_proxy_bypass into request module. If it's False then checking IP and FQDN of the host is skipped in proxy_bypass_registry function. I set the default value to False, because I think it's better when the behaviour of urllib corresponds

[issue29629] rgb_to_hls in colorsys.py

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All coordinates in RGB and HSV spaces are floating point numbers between 0.0 and 1.0. In Wikipedia article h is a degree value between 0° and 360°. Could you provide an example of rgb_to_hls() returning invalid result? -- nosy: +serhiy.storchaka

[issue29627] configparser.ConfigParser.read() has undocumented/unexpected behaviour when given a bytestring path.

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +lukasz.langa ___ Python tracker ___ ___

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As a workaround you can make Struct pickleable: from struct import Struct import copy, copyreg def pickle_struct(s): return Struct, (s.format,) copyreg.pickle(Struct, pickle_struct) s1 = Struct('

[issue29629] rgb_to_hls in colorsys.py

2017-02-22 Thread Madhavendra Sharma
Changes by Madhavendra Sharma : -- title: rgb_to_hls to colorsys.py -> rgb_to_hls in colorsys.py ___ Python tracker ___

[issue29629] rgb_to_hls to colorsys.py

2017-02-22 Thread Madhavendra Sharma
New submission from Madhavendra Sharma: Calculations in rgb_to_hls at line number 67 in python version 2.7.3 for "h" the hue component are not correct according reference mentioned in the same source file "en.wikipedia.org/wiki/HSV_color_space". code snippet: if r == maxc: #h =

[issue29355] sqlite3: remove sqlite3_stmt_readonly()

2017-02-22 Thread Berker Peksag
Berker Peksag added the comment: > - if (!sqlite3_stmt_readonly(self->statement->st)) { > + if (self->statement->is_dml) { Ah, yes now I understand what do you mean! :) I agree and this is already in my local branch to fix issue 28518. -- ___

[issue29549] Improve docstring for str.index

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I mean that this work is useless since it will be lost when convert str.index to Argument Clinic. Well, even when don't use Argument Clinic, but make str.index() be supported by inspect.signature(), the docstring should be significantly rewritten. I think

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread mesheb82
mesheb82 added the comment: Thank you. On Wed, Feb 22, 2017 at 9:22 PM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > > When I run the following code on Windows/Linux for < Python 3.6, I have > no problems. > > You have a problem. Did you try to

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > When I run the following code on Windows/Linux for < Python 3.6, I have no > problems. You have a problem. Did you try to use the copied object? It is a broken Struct object. >>> copied = copy.deepcopy(this_fails) >>> copied.format >>> copied.size -1 >>>

[issue29549] Improve docstring for str.index

2017-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please everyone. Ease up. This is a very simple patch. Copy what is done in str.find to str.index. It doesn't need infinite discussion and debate. I assigned this to Lisa to give her practice. It wasn't intended to have five developers jump in and

First Live Online Python Syntax Checker

2017-02-22 Thread 17chiue
Hi everyone! :) I just wanted to share with everyone a lightweight online tool I created called PythonBuddy (https://github.com/ethanchewy/PythonBuddy) which actively lints Python online. I made this so that MOOCs like edX or codecademy could easily embed and use this on their courses. Also,

[issue29549] Improve docstring for str.index

2017-02-22 Thread Xiang Zhang
Xiang Zhang added the comment: Lisa, could you make a PR? It could let more developers see your patch. -- nosy: +xiang.zhang stage: needs patch -> patch review ___ Python tracker

RE: Python application launcher (for Python code)

2017-02-22 Thread Deborah Swanson
Dennis Lee Bieber wrote, on February 22, 2017 6:48 PM > > On Wed, 22 Feb 2017 10:50:18 -0800, "Deborah Swanson" > declaimed the following: > > > >first, and be able to use a running C version to check my Python > >version against. I couldn't afford Visual Studio,

[issue29626] Issue with spacing in argparse module while using help

2017-02-22 Thread paul j3
paul j3 added the comment: We need to see the parser setup as well. I've never seen a bug like this before. The `usage` line suggests that you are using subparsers. It might be better if you asked this on StackOverFlow with a repeatable code example. That's a better place to get debugging

[issue29549] Improve docstring for str.index

2017-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, I'm not sure what you're referring to by "Just make docstrings in the style of of Argument Clinic descriptions". For the time being, I would like the docstring to match that of str.find(). The point of the patch is to decouple the two. AC

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread mesheb82
New submission from mesheb82: When I run the following code on Windows/Linux for < Python 3.6, I have no problems. When I run in Python 3.6.0, I get the subsequent traceback. I checked the release notes and only saw the following struct module note related to half-floats: Issue #11734 from

[issue29463] Add `docstring` field to AST nodes

2017-02-22 Thread INADA Naoki
INADA Naoki added the comment: s/ #29522 / #29622 / -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29463] Add `docstring` field to AST nodes

2017-02-22 Thread INADA Naoki
INADA Naoki added the comment: OK, let's continue on #29522, and close this issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ideally, proposed API expansions should be based on a demonstrated user need. This API is over decade old and I don't recall a single user request for this functionality. A quick scan of StackOverflow didn't turn-up any questions or answers on the

[issue29355] sqlite3: remove sqlite3_stmt_readonly()

2017-02-22 Thread Ma Lin
Ma Lin added the comment: The "old way" is not using sqlite3_stmt_readonly(). Before 3.6.0, we only count rowcount for INSERT, UPDATE, DELETE, REPLACE: https://hg.python.org/cpython/file/3.5/Modules/_sqlite/cursor.c#l689 These four statements can be representd by is_dml in PR 245:

[issue29594] implementation of __or__ in enum.auto

2017-02-22 Thread Ethan Furman
Ethan Furman added the comment: I also think using leading underscores is a better way to signal that a particular value is "weird". -- ___ Python tracker

[issue29594] implementation of __or__ in enum.auto

2017-02-22 Thread Ethan Furman
Ethan Furman added the comment: @Julian: Giving flag combinations their own name can be useful. For example, instead of seeing Color.GREEN|RED one can see Color.YELLOW . @Marc: I'm not convinced this is a needed change as it doesn't seem to be a common method, nor one that cannot be easily

Re: CSV

2017-02-22 Thread Nathan Ernst
One other thing besides the issues noted with filename - newline is set to a space. It should be set to an empty string. See: https://docs.python.org/3/library/csv.html#id3 Regards, Nate On Wed, Feb 22, 2017 at 3:52 PM, wrote: > On Wednesday, February 22, 2017 at

[issue29627] configparser.ConfigParser.read() has undocumented/unexpected behaviour when given a bytestring path.

2017-02-22 Thread David Ellis
New submission from David Ellis: Related: https://github.com/python/cpython/pull/242 https://bugs.python.org/issue29623 In the discussion over my PR for bpo-29623 it became clear that bytestring paths were also unsupported and it was suggested that that should be a separate issue (currently

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy, David, and Inada Marking this as closed. -- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue29616] input() after restarting causes bug

2017-02-22 Thread Juan
Juan added the comment: I am using Windows 10 64-bit. >> sometimes whatever you pressed in step 3 disappears, > > When Shell is restarted by whatever means, any pending input, whether in > response to '>>>' or user input(), is cancelled and > *should* disappear and not be left to look as if it

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat)

2017-02-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: aiosmtpd is coming along nicely: http://aiosmtpd.readthedocs.io/en/latest/ We'll soon have a 1.0 release. Still, I don't think it's worth pulling this into the stdlib. But we could silently deprecate it and point to aiosmtpd in the docs. --

[issue15657] Error in Python 3 docs for PyMethodDef

2017-02-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think this bug has been fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29626] Issue with spacing in argparse module while using help

2017-02-22 Thread Falguniben Jhaveri
New submission from Falguniben Jhaveri: When I use argparse the optional arguments with character "-p" and "-s" has improper spacing while using help/usage command. Sample out put from argparse module: usage: cli node list [-h] [-p] [-o] Lists nodes in your current project. optional

[issue29355] sqlite3: remove sqlite3_stmt_readonly()

2017-02-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Ma. > We can use the old way in here, the old way is even better IMO. What do you mean by the old way? The use of switch statement? -- dependencies: +execute("begin immediate") throwing OperationalError

[issue29616] input() after restarting causes bug

2017-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: What OS are you using? > 6. Bug. This does not tell me what you think the bug is. > sometimes whatever you pressed in step 3 disappears, When Shell is restarted by whatever means, any pending input, whether in response to '>>>' or user input(), is cancelled

[issue29098] document minimum sqlite version

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- dependencies: +sqlite3: remove sqlite3_stmt_readonly() type: -> enhancement versions: +Python 3.7 ___ Python tracker

[issue28518] execute("begin immediate") throwing OperationalError

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +210 ___ Python tracker ___ ___

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7 only)

2017-02-22 Thread Will Pittman
Will Pittman added the comment: oh, thank you very much and sorry for my negligence! -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue20438] inspect: Deprecate getfullargspec?

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +207 ___ Python tracker ___ ___

[issue20438] inspect: Deprecate getfullargspec?

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +209 ___ Python tracker ___ ___

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +208 ___ Python tracker ___ ___

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +206 ___ Python tracker ___ ___

Re: CSV

2017-02-22 Thread breamoreboy
On Wednesday, February 22, 2017 at 5:55:47 PM UTC, Braxton Alfred wrote: > Why does this not run? It is right out of the CSV file in the Standard Lib. > > Python ver 3.4.4, 64 bit. > > import csv > """ READ EXCEL FILE """ > filename = 'c:\users\user\my documents\Braxton\Excel\personal\bp.csv'

[issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument.

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> patch review ___ Python tracker ___ ___

[issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument.

2017-02-22 Thread David Ellis
Changes by David Ellis : -- pull_requests: +205 ___ Python tracker ___ ___

Re: How to store properties

2017-02-22 Thread MRAB
On 2017-02-22 21:08, Gilmeh Serda wrote: On Wed, 08 Feb 2017 09:31:09 -0800, Rob Gaddi wrote: JSON's cute, but the format doesn't support inline comments. { "your_key": "whatever", "COMMENT": "blah", "meh": [ "yup", "yep", "yip" ], "COMMENT":

[issue22549] bug in accessing bytes, inconsistent with normal strings and python 2.7

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +203 ___ Python tracker ___ ___

[issue22273] abort when passing certain structs by value using ctypes

2017-02-22 Thread Eryk Sun
Eryk Sun added the comment: Notes on fix-22273-02.diff: In the second pass over _fields_, you can (should) use dict->length and dict->proto for array types instead of the _length_ and _type_ attributes. When reassigning stgdict->ffi_type_pointer.elements, if use_broken_old_ctypes_semantics

[issue22594] Add a link to the regex module in re documentation

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +204 ___ Python tracker ___ ___

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker ___ ___

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-22 Thread Christian Heimes
Christian Heimes added the comment: I think we can live with the fact some tmpfile() might write an error message if the system is broken. If user's tmp is not writeable, the user has more serious issues than a write to stdout inside curses module. --

[issue27200] make doctest in CPython has failures

2017-02-22 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +202 ___ Python tracker ___ ___

[issue28686] py.exe ignored PATH when using python3 shebang

2017-02-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7 only)

2017-02-22 Thread Mark Dickinson
Mark Dickinson added the comment: The arguments to rgb_to_hsv are supposed to be floating-point numbers in the range 0.0 to 1.0. That's documented here: https://docs.python.org/2/library/colorsys.html > Coordinates in all of these color spaces are floating point values. In the > YIQ space,

[issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument.

2017-02-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-02-22 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue22047 "argparse improperly prints mutually exclusive options when they are in a group" is similar. - There are two issues: - the nesting of mutually exclusive groups - the formatting of the usage in such cases. Both have come up

Re: CSV

2017-02-22 Thread Jussi Piitulainen
Braxton Alfred writes: > Why does this not run? It is right out of the CSV file in the Standard Lib. > > > > > Python ver 3.4.4, 64 bit. > > > > > > > > import csv > """ READ EXCEL FILE """ > filename = 'c:\users\user\my documents\Braxton\Excel\personal\bp.csv' '\b' is backspace. A

concurrent futures, async futures and await

2017-02-22 Thread Nagy László Zsolt
I'm in a situation where I would like to refactor some code to use native coroutine functions (aync def) instead of "normal" coroutines that use yield. Most of the code is asnyc, but some of the operations are performed in different threads (using concurrent.futures.Executor). We have

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7 only)

2017-02-22 Thread Will Pittman
Changes by Will Pittman : -- title: colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only) -> colorsys.rgb_to_hsv always returns saturation as 0 (python2.7 only) ___ Python tracker

[issue28129] assertion failures in ctypes

2017-02-22 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only)

2017-02-22 Thread Will Pittman
Will Pittman added the comment: The bug appears to be caused by the difference in division symbols between python3 vs python2. The issue appears to be resolved if you add the following line to the `/usr/lib/python2.7.13/colorsys.py` module (or if all arguments are converted to floats). from

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7.13 only)

2017-02-22 Thread Will Pittman
New submission from Will Pittman: colorsys.rgb_to_hsv appears to be broken on python2.7.13 (on archlinux). Saturation is always reported as 0. ex: import colorsys rgb_to_hsv( 127, 116, 18 ) >>> (0.1, 0, 127) -- messages: 288380 nosy: Will Pittman priority: normal

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-22 Thread Steve Dower
New submission from Steve Dower: For some reason, the install bootstrapper for 3.5.3 x86 embedded the wrong hash value for launcher.msi. As a result, it will fail to download the file and install will be aborted. The workaround is to deselect the launcher from being installed, and use the

RE: Python application launcher (for Python code)

2017-02-22 Thread Deborah Swanson
Grant Edwards wrote, on February 22, 2017 7:52 AM > > On 2017-02-21, Chris Warrick wrote: > > > Git Bash, or basically msys, is pretty reasonable. But if you are on > > Windows 10, you might like the built-in Windows Subsystem for Linux > > (aka Bash on Ubuntu on Windows)

Re: If statement with or operator

2017-02-22 Thread Rhodri James
On 22/02/17 17:38, Peter Pearson wrote: On Wed, 22 Feb 2017 22:33:31 +0530, Ganesh Pal wrote: [snip] I need suggestion on the if statement in the below code , all that I was trying to do was to add a check i.e if any one of the functions return True then break the loop. end_time =

[issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument.

2017-02-22 Thread David Ellis
New submission from David Ellis: Trying to use configparser.ConfigParser.read on a pathlib object results in a TypeError. If supplied in a list it works as expected. Repro: >>> import pathlib, configparser >>> configparser.ConfigParser().read(pathlib.Path('some.ini')) TypeError:

Re: python decorator

2017-02-22 Thread Irmen de Jong
On 22-2-2017 8:39, Argentinian Black ops lll wrote: > Thanks for the quick response...! you saved me a lot of time, thank you! > I don't know if you want/have to use your own custom caching decorator, but are you aware of the lru_cache decorator that's part of the standard library?

Re: CSV

2017-02-22 Thread Irmen de Jong
On 22-2-2017 18:26, Braxton Alfred wrote: > Why does this not run? It is right out of the CSV file in the Standard Lib. What does "not run" mean. We can't help if you are not telling us the exact error message you're getting (if any) > filename = 'c:\users\user\my

Re: CSV

2017-02-22 Thread Chris Angelico
On Thu, Feb 23, 2017 at 4:26 AM, Braxton Alfred wrote: > filename = 'c:\users\user\my documents\Braxton\Excel\personal\bp.csv' Use forward slashes instead. Also, if something isn't working, post the actual output - probably an exception. Don't assume that we can read your

CSV

2017-02-22 Thread Braxton Alfred
Why does this not run? It is right out of the CSV file in the Standard Lib. Python ver 3.4.4, 64 bit. import csv """ READ EXCEL FILE """ filename = 'c:\users\user\my documents\Braxton\Excel\personal\bp.csv' with open (filename, newline = ' ') as bp: dialect = csv.excel

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-22 Thread slytomcat
slytomcat added the comment: I've closed pull request on GitHub. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-22 Thread slytomcat
slytomcat added the comment: I can't fully agree with this: >Queue objects are primarily about managing a queue of inputs. >Monitoring and managing consumers is another (mostly orthogonal) realm. Monitoring of consumers is already added via task_done() and join() methods. At least this two

Re: python decorator

2017-02-22 Thread Ian Kelly
On Wed, Feb 22, 2017 at 8:16 AM, Pavol Lisy wrote: > Maybe this technique could be reusable (and maybe part of functools?) > > With this decorator: > > def wrap_args(decorator): > def decor_out(*args, **kwargs): > def decor_in(func): >

Re: If statement with or operator

2017-02-22 Thread Peter Pearson
On Wed, 22 Feb 2017 22:33:31 +0530, Ganesh Pal wrote: [snip] > I need suggestion on the if statement in the below code , all that I was > trying to do was to add a check i.e if any one of the functions return > True then break the loop. > > end_time = time.time() + 300 > umount_completed

Re: If statement with or operator

2017-02-22 Thread alister
On Wed, 22 Feb 2017 22:33:31 +0530, Ganesh Pal wrote: > Hello Friends, > > I need suggestion on the if statement in the below code , all that I > was trying to do was to add a check i.e if any one of the functions > return True then break the loop. > > > end_time = time.time() + 300 >

If statement with or operator

2017-02-22 Thread Ganesh Pal
Hello Friends, I need suggestion on the if statement in the below code , all that I was trying to do was to add a check i.e if any one of the functions return True then break the loop. end_time = time.time() + 300 umount_completed = False while time.time() < end_time: if

[issue29463] Add `docstring` field to AST nodes

2017-02-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: thank you for your work on the AST, I know many developers are looking forward to improvement and stabilisation with the hope of having it stable (and documented) in the stdlib at some point. The recent change in PR 46 now change (at least) the

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Duplicating my comment of 29463 who was in a race condition with this issue: thank you for your work on the AST, I know many developers are looking forward to improvement and stabilisation with the hope of having it stable (and documented) in the

[issue29463] Add `docstring` field to AST nodes

2017-02-22 Thread STINNER Victor
STINNER Victor added the comment: This issue broke the ast API. Copy of the following comment on the PR: https://github.com/python/cpython/pull/46#issuecomment-281721296 --- Carreau: Thanks for this ! Improvement to the AST are welcome ! Would it have been possible to make the docstring

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-22 Thread STINNER Victor
New submission from STINNER Victor: The _ast.AST constructor requires a tuple with the same number of items than the fields list. Example with Raise: ASDL: Raise(expr? exc, expr? cause) >>> import _ast >>> _ast.Raise() <_ast.Raise object at 0x7fc2ca7dee90> >>> _ast.Raise(1) Traceback (most

[issue29621] telnetlib.Telnet.write gives confusing error message when a string is passed in

2017-02-22 Thread John Hagen
New submission from John Hagen: I was recently helping someone learn Python 3 from Python 2 and they were confused by error resulting from the following easy-to-make mistake: import telnetlib tn = telnetlib.Telnet('localhost') tn.write('hello') Traceback (most recent call last): File

[issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size

2017-02-22 Thread kernc
New submission from kernc: If any of the objects in sys.modules is a module-like object that performs some additional imports in its __getattribute__ (as appropriate) handler, the following simple unit test test case: import unittest import warnings ... # Ensure one of the

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or use DictReader with an explicit fieldnames argument. -- ___ Python tracker ___

Re: Python application launcher (for Python code)

2017-02-22 Thread Grant Edwards
On 2017-02-21, Chris Warrick wrote: > Git Bash, or basically msys, is pretty reasonable. But if you are on > Windows 10, you might like the built-in Windows Subsystem for Linux > (aka Bash on Ubuntu on Windows) more — it’s real Linux that runs > alongside Windows, but less

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm with Inada and David. This use case looks very specific. If you need to handle a CSV file with duplicated header, you can use the regular reader or implement your own specialised reader. -- nosy: +serhiy.storchaka

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread R. David Murray
R. David Murray added the comment: My opinion stated in that issue is still the same: I don't think this is a bug. I don't think automatic handling of fieldnames when no other dictionary features are retained is worth the complication to the API. So I'm still -1. We'll see what other

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread foxfluff
foxfluff added the comment: David: You are correct that the goal is to handle CSVs with duplicate headers, and that the main intention is to have some of the behavior of DictReader without the destruction of data (such as the auto population of field names as you stated). It is not the

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-22 Thread STINNER Victor
STINNER Victor added the comment: Can you please try to write a pull request? https://docs.python.org/devguide/pullrequest.html -- ___ Python tracker ___

Re: python decorator

2017-02-22 Thread Pavol Lisy
On 2/22/17, Steve D'Aprano wrote: > On Wed, 22 Feb 2017 08:47 pm, Cecil Westerhof wrote: > >> On Wednesday 22 Feb 2017 08:49 CET, Argentinian Black ops lll wrote: >> >>> *** SOLVED *** >> >> It would be nice if you shared the solution. > > I believe Cameron's post

[issue29546] A more helpful ImportError message

2017-02-22 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29614] Additional implementation alternative to DictReader

2017-02-22 Thread R. David Murray
R. David Murray added the comment: Inada: I believe the goal is to be able to handle CSV files that have columns with duplicate names. However, in that case one could just use the regular reader class. The only advantage TableReader gives over the regular reader that I can see is that it

  1   2   >