Re: Can math.atan2 return INF?

2016-07-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 11:33:58 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > > > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > > > >> you state that Turing "believes in souls" and that he "wishes to > >> put the soul

[issue27366] PEP487: Simpler customization of class creation

2016-07-29 Thread Nick Coghlan
Nick Coghlan added the comment: Martin's latest patch looks good to me, so I'm applying it now and will push it once a local run of the test suite gives it the thumbs up :) -- ___ Python tracker

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue16700. On Windows there are two sets of API: Unicode and bytes. File names are stored in Unicode (UTF-16) in modern filesystems and encoded to bytes by system for bytes API. Unfortunately this encoding is lossfull. Windows try to find the

[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-07-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Tk widgets tk_dialog and tk_messageBox (corresponding Tkinter widgets dialog.Dialog and messagebox.Message) pressing Return invokes focused button. The comment in tk_dialog implementation: # 4. Create a binding for on the dialog if there is a #

[issue26942] android: test_ctypes crashes on armv7 and aarch64

2016-07-29 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: You're right. I thought the default malloc() implementation is better, and now I think a unified implementation on Android brings less surprises. -- Added file: http://bugs.python.org/file43945/libffi-pr240.patch ___

Re: Why not allow empty code blocks?

2016-07-29 Thread Steven D'Aprano
On Sat, 30 Jul 2016 04:32 am, Antoon Pardon wrote: > Op 29-07-16 om 16:38 schreef Steven D'Aprano: >> On Fri, 29 Jul 2016 11:55 pm, Antoon Pardon wrote: >> >>> Op 29-07-16 om 15:43 schreef Steven D'Aprano: Of course it won't, which is why I don't believe all these folks who claim that

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-29 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've confirmed the issue. It does indeed only occur if the string passed to rmtree is bytes. I discovered this during my investigation of https://github.com/cherrypy/cherrypy/issues/1467. The following script will replicate the failure on Windows systems on

Re: Why not allow empty code blocks?

2016-07-29 Thread Steven D'Aprano
On Sat, 30 Jul 2016 06:19 am, BartC wrote: > The language requires that blocks always contains 1 or more statements. > Fair enough, except that 0 statements are often needed They really aren't. The standard library uses more "pass" statements than most code I've seen, because of the large

Re: JSON result parsing

2016-07-29 Thread John Gordon
In TUA writes: > I want to retrieve the value for a key 'ID' but only if I have a single > result and, obviously, if ID is present. > How can I do this with pythonic elegance? > Thanks for all suggestions! if

Re: Python text file fetch specific part of line

2016-07-29 Thread cs
On 29Jul2016 18:42, Gordon Levi wrote: c...@zip.com.au wrote: On 28Jul2016 19:28, Gordon Levi wrote: Arshpreet Singh wrote: I am writing Imdb scrapper, and getting available list of titles from IMDB website which provide

[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-29 Thread Martin Panter
Martin Panter added the comment: I’m not familiar with the implementation, but it does seem like this should be fixed within _PyLong_AsByteArray(). Also, what about int.from_bytes(b"", ..., signed=True)? There are existing tests for this case, but it seems like it should be an error, rather

Re: TypeError: '_TemporaryFileWrapper' object is not an iterator

2016-07-29 Thread eryk sun
On Fri, Jul 29, 2016 at 7:34 PM, Terry Reedy wrote: > On 7/29/2016 7:59 AM, eryk sun wrote: >> >> On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon >> wrote: >>> >>> The problem seems to come from my expectation that a file >>> is its own iterator and

[issue27643] test_ctypes fails on AIX with xlc

2016-07-29 Thread Martin Panter
Martin Panter added the comment: Looks like your Python 3 build is messed up. Maybe it doesn’t like running from a different directory. I would try from the main build directory, and note the test_bitfields has an S: ./python -m unittest -v ctypes.test.test_bitfields What I am suggesting as

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Rémi Rampin
Rémi Rampin added the comment: Here it goes - Clarified that _proxy suffix should be lowercase - Indented ..note: blocks under function/class -- Added file: http://bugs.python.org/file43944/python-3.5-httpoxy.patch ___ Python tracker

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Rémi Rampin
Changes by Rémi Rampin : Added file: http://bugs.python.org/file43943/python-2.7-httpoxy.patch ___ Python tracker ___

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Rémi Rampin
Changes by Rémi Rampin : Removed file: http://bugs.python.org/file43801/python-3.5-httpoxy.patch ___ Python tracker ___

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Rémi Rampin
Changes by Rémi Rampin : Removed file: http://bugs.python.org/file43800/python-2.7-httpoxy.patch ___ Python tracker ___

[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-29 Thread Anders Lorentsen
Anders Lorentsen added the comment: I updated my patch to account for that second corner case. But ideally, shouldn't it rather be accounted for in the function that does the actual conversion, that is, in _PyLong_AsByteArray? -- Added file:

RE: SOAP and Zeep

2016-07-29 Thread Joseph L. Casale
> Or any other libraries that can be recommended? I'd recommend Spyne, code and docs are good, but more importantly the lead dev is responsive and very helpful. Can't speak highly enough about him... http://spyne.io/ hth, jlc -- https://mail.python.org/mailman/listinfo/python-list

JSON result parsing

2016-07-29 Thread TUA
Calls to my REST api may either return a dict (for single results) or a list of dicts (for multiple results). I receive these results using the requests library. I want to retrieve the value for a key 'ID' but only if I have a single result and, obviously, if ID is present. How can I do this

Re: Call function via literal name

2016-07-29 Thread TUA
On Friday, 29 July 2016 13:35:30 UTC-7, TUA wrote: > Rather than do this: > > if test['method'] == 'GET': > res = requests.get(test['endpoint'],auth=test['auth'], > verify=False) > elif test['method'] == 'POST': > res =

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Guido van Rossum
Guido van Rossum added the comment: Mercurial revs: fd0dce6d33e7, 15a35a8da24b, 4ecea1ea11bf, 4ecea1ea11bf. -- ___ Python tracker ___

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! Should go live later today. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27524] Update os.path for PEP 519/__fspath__()

2016-07-29 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch that includes the previous tests as long with fixes which don't involve stat or lstat (once those functions are updated themselves then os.path will be ported). -- Added file: http://bugs.python.org/file43941/os_path.diff

Re: Why not allow empty code blocks?

2016-07-29 Thread Marko Rauhamaa
BartC : > On 29/07/2016 20:43, Terry Reedy wrote: >> So put in 'pass' whether or not there is no debugging code, >> commented-out debugging code, or debugging code that runs, or whatever. > > But that's inelegant. > > The language requires that blocks always contains 1 or more >

[issue27477] IDLE: Switch dialogs to ttk widgets.

2016-07-29 Thread Mark Roseman
Mark Roseman added the comment: Great start. Needs to have a ttk.Frame directly inside the toplevel window to avoid whitespace showing around grey widgets (like in query dialog shot). I'd also like to see the spacing adjusted (all platforms) and button positions changed on Mac to go at the

[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-07-29 Thread Mark Roseman
Mark Roseman added the comment: Terry, thanks for the TkDocs correction. As you'll note from the attached dlgonmac.png, there's a bit of tweaking needed with regard to geometry management etc. to get the background right. Now that ttk is ok (so to speak), would you be open to some patches

[issue19837] Wire protocol encoding for the JSON module

2016-07-29 Thread Kevin Dwyer
Changes by Kevin Dwyer : -- nosy: +kdwyer ___ Python tracker ___ ___

[issue1521950] shlex.split() does not tokenize like the shell

2016-07-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea99e2f0b829 by Vinay Sajip in branch 'default': Closes #1521950: Made shlex parsing more shell-like. https://hg.python.org/cpython/rev/ea99e2f0b829 -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open ->

[issue27613] Empty iterator with fake __len__ is rendered as a single bracket ] when using json's iterencode

2016-07-29 Thread ppperry
Changes by ppperry : -- title: Empty iterator is rendered as a single bracket ] when using json's iterencode -> Empty iterator with fake __len__ is rendered as a single bracket ] when using json's iterencode ___ Python tracker

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I have only one optional comment on the second revision. -- nosy: +gvanrossum ___ Python tracker ___

[issue26942] android: test_ctypes crashes on armv7 and aarch64

2016-07-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: > By msg264746, only ARM fails, so I patch libffi for arm and aarch64 triplets > only Why not for all Android architectures (*-linux-android*) as it is done in PR120 ? -- stage: -> patch review ___ Python tracker

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Michael Lee
Michael Lee added the comment: Ok, here's revision 2 of my patch, after applying the changes from the last round of feedback. -- Added file: http://bugs.python.org/file43939/document_newtype_rev2.patch ___ Python tracker

Re: Call function via literal name

2016-07-29 Thread Ian Kelly
On Fri, Jul 29, 2016 at 2:35 PM, TUA wrote: > Rather than do this: > > if test['method'] == 'GET': > res = requests.get(test['endpoint'],auth=test['auth'], > verify=False) > elif test['method'] == 'POST': > res =

Re: Call function via literal name

2016-07-29 Thread Jon Ribbens
On 2016-07-29, TUA wrote: > Rather than do this: > > if test['method'] == 'GET': > res = requests.get(test['endpoint'],auth=test['auth'], > verify=False) > elif test['method'] == 'POST': > res =

[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

2016-07-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: Nice. FWIW cross-compilation for Android works fine with comment-out-regen.patch. > In native compiling mode, everything should be as normal. When > cross-compiling, the rules for regenerating files should read like > > Python/importlib.h: #

Call function via literal name

2016-07-29 Thread TUA
Rather than do this: if test['method'] == 'GET': res = requests.get(test['endpoint'],auth=test['auth'], verify=False) elif test['method'] == 'POST': res = requests.post(test['endpoint'], auth=test['auth'], verify=False,

Re: Why not allow empty code blocks?

2016-07-29 Thread BartC
On 29/07/2016 20:43, Terry Reedy wrote: On 7/29/2016 4:58 AM, Antoon Pardon wrote: Something like. try: Some code except Some_Exception: # Commented code for when I am debugging pass So put in 'pass' whether or not there is no debugging code, commented-out debugging code, or

[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-07-29 Thread Ram Rachum
New submission from Ram Rachum: A while ago I was debugging through code that uses the `logging` module, and I was looking at `Logger` objects and possibly other kinds of objects (maybe handlers? It was a while ago.) I was frustrated because I was trying to figure out what a particular logger

[issue27524] Update os.path for PEP 519/__fspath__()

2016-07-29 Thread Brett Cannon
Brett Cannon added the comment: Ran into the first nasty snag: people are abusing os.path.commonprefix() and it's extremely generic approach. Instead of passing in a list of file paths they are passing a list of lists of file path *parts*, e.g. instead of ["a/b", "a/c"] they are passing in

[issue27604] More details about `-O` flag

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The -O entry is unchanged from when the Using doc was added in 2007. I believe there has been discussion about being more specific and that Guido said something, but that is the most I will say. -- ___ Python

[issue27604] More details about `-O` flag

2016-07-29 Thread Ram Rachum
Ram Rachum added the comment: Hi David, I attached a patch that follows your instructions, but to be honest, if I wasn't the person writing this patch and I wanted to find the information "Does Python do any optimization besides dumping asserts when I do -O?" I'm not sure I'd be able to

Re: Why not allow empty code blocks?

2016-07-29 Thread Terry Reedy
On 7/29/2016 4:58 AM, Antoon Pardon wrote: Op 23-07-16 om 16:19 schreef Chris Angelico: On Sun, Jul 24, 2016 at 12:00 AM, BartC wrote: Or, for debugging or other reasons, when you need to comment out the contents of a block. Then pass needs to be added. How often do you

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Should I edit the patch to include a sentence or two describing this > distinction, just remove the word "almost", or do something else? I think the best way is to remove the "almost" and briefly explain that you cannot subclass types returned by NewType.

Re: TypeError: '_TemporaryFileWrapper' object is not an iterator

2016-07-29 Thread Terry Reedy
On 7/29/2016 7:59 AM, eryk sun wrote: On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon wrote: The problem seems to come from my expectation that a file is its own iterator and in python3 that is no longer true for a NamedTemporaryFile. For some reason it uses a

Re: TypeError: '_TemporaryFileWrapper' object is not an iterator

2016-07-29 Thread Terry Reedy
On 7/29/2016 4:43 AM, Antoon Pardon wrote: Below is a short program that illustrate the problem It works with python2, whether you use the -c option or not. It only works with python3 if you use the -c option. The problem seems to come from my expectation that a file is its own iterator and in

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-29 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file43937/refresh-2016-07-29.diff ___ Python tracker ___

Re: Why not allow empty code blocks?

2016-07-29 Thread Antoon Pardon
Op 29-07-16 om 16:38 schreef Steven D'Aprano: > On Fri, 29 Jul 2016 11:55 pm, Antoon Pardon wrote: > >> Op 29-07-16 om 15:43 schreef Steven D'Aprano: >>> Of course it won't, which is why I don't believe all these folks who >>> claim that they regularly ("all the time", "fairly often") replace

[issue27613] Empty iterator is rendered as a single bracket ] when using json's iterencode

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am surprised that dumping to a string and to a file give different answers. This strikes me as a bug in any case. I would expect the the main difference would be file.write(chunk) versus temlist.append(chunk). -- nosy: +terry.reedy

SOAP and Zeep

2016-07-29 Thread Ethan Furman
Greetings! I may have a need in the immediate future to work with SOAP and WSDL services, and a quick search turned up Zeep (http://docs.python-zeep.org/en/latest/) -- does anyone have any experience with it? Or any other libraries that can be recommended? Thanks. -- ~Ethan~ --

[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here is a more accurate 'equivalent': "any(x is e or for e in )" where 'candidate members' is "members with the same hash as x" for built-in hash-based collections and 'all members' for built-in unsorted sequences". I am sure that built-in range does a

[issue27604] More details about `-O` flag

2016-07-29 Thread R. David Murray
R. David Murray added the comment: I think the cmdline ref telling you that optimizations are enabled or disabled is enough. If someone wants technical information they can click on the link. For comparison, the gcc man page lists what optimizations the -O levels enable, but does not

[issue27604] More details about `-O` flag

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ram > (At least my boss and team members have asked that, and people on Stack Overflow.) Ram, to me it would have been helpful if you had said this initially. It gives a doc change request a bit more force. -- nosy: +terry.reedy

[issue27453] $CPP invocation in configure must use $CPPFLAGS

2016-07-29 Thread STINNER Victor
STINNER Victor added the comment: ndk-clang-preprocessor.patch LGTM. -- ___ Python tracker ___ ___

Re: Why not allow empty code blocks?

2016-07-29 Thread D'Arcy J.M. Cain
On Fri, 29 Jul 2016 15:55:07 +0200 Antoon Pardon wrote: > I think the case where you just want to ignore the exception, but it > can at times be useful to get some extra logging information for > debuging purposes, is not that rare as you seem to suggest. The way I

[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-list

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-07-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: To reproduce the problem on any system where Python is built with configure: $ mkdir -p tmp/build tmp/install $ cd tmp $ hg clone https://hg.python.org/cpython cpython $ cd build $ $(cd ../cpython && pwd)/configure --prefix=$(cd ../install && pwd) && make

Re: Why not allow empty code blocks?

2016-07-29 Thread D'Arcy J.M. Cain
On Fri, 29 Jul 2016 14:15:01 +0100 BartC wrote: > > try: > >Some code > > # except Some_Exception: > ># Commented code for when I am debugging > > Will it behave the same way when there is a Some_Exception exception? Of course not. The person writing that was an

[issue27643] test_ctypes fails on AIX with xlc

2016-07-29 Thread Michael Felt
Michael Felt added the comment: FYI - after a couple of test compiles, it seems that IBM XLC does not report a message when the size specified is int, unsigned or long (i.e., does not like short). Are you interested in the results using a size other than short - or would that break something

[issue27643] test_ctypes fails on AIX with xlc

2016-07-29 Thread Michael Felt
Michael Felt added the comment: > I presume this also affects Python 3. I presume this as well - however, harder to verify... michael@x071:[/data/prj/aixtools/python/python-3.6.0.162/Lib/ctypes/test]../../../python test_bitfield.py Could not find platform dependent libraries Consider setting

[issue27453] $CPP invocation in configure must use $CPPFLAGS

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +haypo stage: -> commit review ___ Python tracker ___

[issue27604] More details about `-O` flag

2016-07-29 Thread Ram Rachum
Ram Rachum added the comment: I uploaded a new patch. I added another thing: Mentioning explicitly that no other optimizations are currently being made. I think this is important because it's often the question that the user is asking themselves. (At least my boss and team members have asked

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-07-29 Thread livetemartin
On Saturday, December 12, 2015 at 1:05:29 AM UTC-8, Harbey Leke wrote: > Create a class called BankAccount > > .Create a constructor that takes in an integer and assigns this to a > `balance` property. > > .Create a method called `deposit` that takes in cash deposit amount and > updates the

[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-07-29 Thread Steve Dower
Steve Dower added the comment: I think the WDK is still separate from the Windows SDK, so probably best to keep the custom definition with a comment specifying which file it came from (so whoever diagnoses an obscure issue in the future can find it quickly). With the comment, I'm fine with

[issue27435] ctypes and AIX - also for 2.7.X (and later)

2016-07-29 Thread Michael Felt
Michael Felt added the comment: """ Lib/ctype support for LoadLibrary interface to dlopen() for AIX Similar kind of support (i.e., as a separate file) as has been done for Darwin support ctype.macholib.* rather than as been done with for "ce", "nt", "solaris", and "bsd" with separate, detailed

Re: Why not allow empty code blocks?

2016-07-29 Thread Steven D'Aprano
On Fri, 29 Jul 2016 11:55 pm, Antoon Pardon wrote: > Op 29-07-16 om 15:43 schreef Steven D'Aprano: >> Of course it won't, which is why I don't believe all these folks who >> claim that they regularly ("all the time", "fairly often") replace except >> blocks with `pass`. I call shenanigans --

Re: Float

2016-07-29 Thread Steven D'Aprano
On Fri, 29 Jul 2016 07:44 pm, Cai Gengyang wrote: > Can someone explain in layman's terms what "float" means ? Floating point number: https://en.wikipedia.org/wiki/Floating_point As opposed to fixed point numbers: https://en.wikipedia.org/wiki/Fixed-point_arithmetic Python floats use 64 bits

[issue27648] Message of webbrowser.py something wrong.

2016-07-29 Thread 김태환
김태환 added the comment: I think you’re right. I also think that Korean message(final line) prints by chrome. (Another lines printed by my own codes, please don’t care) But I used webbrowser.open() code to outside of __main__. I will test my codes from other web browser (like Firefox) Thank

[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2016-07-29 Thread R. David Murray
R. David Murray added the comment: Kim: if you can prove it is broken, please open a new issue, this one is closed (you can reference it by just typing # followed by the issue number, and the tracker will automatically make a link). -- ___ Python

[issue27649] multiprocessing on Windows does not properly manage class attributes

2016-07-29 Thread R. David Murray
R. David Murray added the comment: Right this is a fork vs spawn issue, not a bug. I don't know why Eryk changed the versions the way he did, but FYI we use that field to indicate which version we will apply a patch to, so it is pretty much irrelevant when there isn't actually a bug :)

[issue27649] multiprocessing on Windows does not properly manage class attributes

2016-07-29 Thread Ian Cordasco
Ian Cordasco added the comment: Why did you remove Python 3.3? It's still affected by this behaviour. -- ___ Python tracker ___

[issue27624] unclear documentation on Queue.qsize()

2016-07-29 Thread R. David Murray
R. David Murray added the comment: Doug: side note. Raymond teaches Python, and makes a study of what works and doesn't work in communicating it to students, so he isn't rejecting this lightly. -- ___ Python tracker

[issue27648] Message of webbrowser.py something wrong.

2016-07-29 Thread R. David Murray
R. David Murray added the comment: Since python isn't internationalized, or even set up for someone else to do it (other than getopt/optparse/argparse, and webbrowser doesn't use those outside of __main__), I don't see how that message could be coming from Python. Most likely the message is

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-29 Thread R. David Murray
R. David Murray added the comment: Returning the undecoded payload is a good idea. Let's go with that. The email module, unlike most stdlib packages, has a mandate that the parser should never raise an error. Instead we do our best to guess (very unlike everything else in python!) and note

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Rémi Rampin
Rémi Rampin added the comment: I was away for a bit, I will make the requested changes tonight. -- ___ Python tracker ___

Re: Why not allow empty code blocks?

2016-07-29 Thread Antoon Pardon
Op 29-07-16 om 15:43 schreef Steven D'Aprano: > Of course it won't, which is why I don't believe all these folks who claim > that they regularly ("all the time", "fairly often") replace except blocks > with `pass`. I call shenanigans -- perhaps you do it *occasionally*, but as > a general rule,

Re: Why not allow empty code blocks?

2016-07-29 Thread Antoon Pardon
Op 29-07-16 om 13:14 schreef D'Arcy J.M. Cain: > On Fri, 29 Jul 2016 10:58:35 +0200 > Antoon Pardon wrote: >> As BartC already mentions it happens fairly often during debugging. >> Something like. >> >> try: >>Some code >> except Some_Exception: >># Commented

[issue27649] multiprocessing on Windows does not properly manage class attributes

2016-07-29 Thread Eryk Sun
Eryk Sun added the comment: Queuing the class doesn't do anything here. It gets pickled as a module attribute; the queue isn't marshaling the class dict. For example: >>> pickletools.dis(pickle.dumps(mccabe.McCabeChecker)) 0: \x80 PROTO 3 2: cGLOBAL 'mccabe

Re: Why not allow empty code blocks?

2016-07-29 Thread Steven D'Aprano
On Fri, 29 Jul 2016 11:15 pm, BartC wrote: > On 29/07/2016 12:14, D'Arcy J.M. Cain wrote: >> On Fri, 29 Jul 2016 10:58:35 +0200 >> Antoon Pardon wrote: >>> As BartC already mentions it happens fairly often during debugging. >>> Something like. >>> >>> try: >>>

Re: Why not allow empty code blocks?

2016-07-29 Thread Ian Kelly
On Jul 29, 2016 7:22 AM, "BartC" wrote: > > On 29/07/2016 12:14, D'Arcy J.M. Cain wrote: >> >> On Fri, 29 Jul 2016 10:58:35 +0200 >> Antoon Pardon wrote: >>> >>> As BartC already mentions it happens fairly often during debugging. >>> Something like.

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-29 Thread Michael Felt
Michael Felt added the comment: Vinay - I am in favor, but if the root cause of the holdup is unclear documentation then let's address the root cause. Stronger, I am in agreement. The first patch I submitted for AIX included using LIBPATH (and could have added LD_LIBRARY_PATH) - but that was

Re: Why not allow empty code blocks?

2016-07-29 Thread BartC
On 29/07/2016 12:14, D'Arcy J.M. Cain wrote: On Fri, 29 Jul 2016 10:58:35 +0200 Antoon Pardon wrote: As BartC already mentions it happens fairly often during debugging. Something like. try: Some code except Some_Exception: # Commented code for when I am

[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2016-07-29 Thread Kim Randell
Kim Randell added the comment: I don't have an example case, but from reading the code it looks as though the AbstractDigestAuthHandler has exactly the same faults as the old version of AbstractBasicAuthHandler (i.e. using req.headers.get instead of req.get_header, and corresponding retry

ANN: Bokeh 0.12.1 released

2016-07-29 Thread Bryan Van de Ven
Hi all, On behalf of the Bokeh team, I am pleased to announce the release of version 0.12.1 of Bokeh! This is a minor, incremental update that adds a few new small features and fixes several bugs. Please see the announcement post at:

Re: TypeError: '_TemporaryFileWrapper' object is not an iterator

2016-07-29 Thread eryk sun
On Fri, Jul 29, 2016 at 8:43 AM, Antoon Pardon wrote: > > The problem seems to come from my expectation that a file > is its own iterator and in python3 that is no longer true > for a NamedTemporaryFile. For some reason it uses a generator function for __iter__

[issue27640] add the '--disable-test-suite' option to configure

2016-07-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks for the review Martin. I will update the patch accordingly later. -- ___ Python tracker ___

[issue26851] android compilation and link flags

2016-07-29 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

Re: Why not allow empty code blocks?

2016-07-29 Thread D'Arcy J.M. Cain
On Fri, 29 Jul 2016 10:58:35 +0200 Antoon Pardon wrote: > As BartC already mentions it happens fairly often during debugging. > Something like. > > try: >Some code > except Some_Exception: ># Commented code for when I am debugging >pass I realize that

[issue27649] multiprocessing on Windows does not properly manage class attributes

2016-07-29 Thread Ian Cordasco
New submission from Ian Cordasco: In trying to add support for multiprocessing on Windows in Flake8, I found that the behaviour of the module is significantly different than on Unix. If you have a class that has class-level attributes on Unix, and you change them, put the class into a Queue

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Ian Cordasco
Changes by Ian Cordasco : -- nosy: +icordasc ___ Python tracker ___ ___

[issue27627] clang fails to build ctypes on Android armv7

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +thomas-petazzoni ___ Python tracker ___ ___

[issue27606] Android cross-built for armv5te with clang and '-mthumb' crashes with SIGSEGV or SIGILL

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +thomas-petazzoni ___ Python tracker ___ ___

[issue22724] byte-compile fails for cross-builds

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +thomas-petazzoni ___ Python tracker ___ ___

[issue27453] $CPP invocation in configure must use $CPPFLAGS

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +thomas-petazzoni ___ Python tracker ___ ___

Re: Float

2016-07-29 Thread Ben Finney
Cai Gengyang writes: > Can someone explain in layman's terms what "float" means ? They are a compromise: in a known number of bits and with explict very-fast hardware support, represent numbers at a large range of scales. The compromise is that the values have limited

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-07-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +thomas-petazzoni ___ Python tracker ___ ___

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-07-29 Thread Petr Viktorin
Petr Viktorin added the comment: The conversation seems to have stalled. Rémi, are you still working on the patch? Should someone take over? -- nosy: +encukou ___ Python tracker

Re: Float

2016-07-29 Thread Lutz Horn
Am 07/29/2016 um 11:44 AM schrieb Cai Gengyang: Can someone explain in layman's terms what "float" means ? The Python builtin float[1] > Return a floating point number constructed from a number or string x. A floating point number[2] is number that is not an integer (and not a complex

Float

2016-07-29 Thread Cai Gengyang
Can someone explain in layman's terms what "float" means ? >>> x = float(input("Write a number")) Write a number 16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-29 Thread Antoon Pardon
Op 23-07-16 om 16:19 schreef Chris Angelico: > On Sun, Jul 24, 2016 at 12:00 AM, BartC wrote: >> Or, for debugging or other reasons, when you need to comment out the >> contents of a block. Then pass needs to be added. > How often do you comment out an entire block and not its

  1   2   >