Re: Assignment Versus Equality

2016-06-28 Thread Lawrence D’Oliveiro
On Wednesday, June 29, 2016 at 5:26:46 PM UTC+12, Steven D'Aprano wrote: > BUT in Python 3, the distinction between int and long is gone by dropping > int and renaming long as "int". So all Python ints are BIGNUMs. I don’t understand what the problem is with this. Is there supposed to be some

Re: Assignment Versus Equality

2016-06-28 Thread Steven D'Aprano
On Wednesday 29 June 2016 14:51, Lawrence D’Oliveiro wrote: > On Wednesday, June 29, 2016 at 4:20:24 PM UTC+12, Chris Angelico wrote: >>> https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and- stupid/ >> >> """It would also be reasonable to assume that any sane language >> runtime

Re: Assignment Versus Equality

2016-06-28 Thread Chris Angelico
On Wed, Jun 29, 2016 at 2:51 PM, Lawrence D’Oliveiro wrote: > On Wednesday, June 29, 2016 at 4:20:24 PM UTC+12, Chris Angelico wrote: >>> https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/ >> >> """It would also be reasonable to assume that any

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +steve.dower ___ Python tracker ___ ___

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2016-06-28 Thread Martin Panter
Martin Panter added the comment: Robert: in issue17911-2.patch (and the eventual commit) you added a check for value == 'None' in _format_final_exc_line(). Why was this necessary? I think it is the cause of my Issue 27348 regression: >>> traceback.format_exception(Exception, Exception("One"),

[issue27348] traceback (and threading) drops exception message

2016-06-28 Thread Martin Panter
Martin Panter added the comment: I traced this back to revision 73afda5a4e4c (Issue 17911), which includes this change to traceback._format_final_exc_line(): -if value is None or not valuestr: +if value == 'None' or value is None or not valuestr: -- components: +Library (Lib)

Re: Assignment Versus Equality

2016-06-28 Thread Lawrence D’Oliveiro
On Wednesday, June 29, 2016 at 4:20:24 PM UTC+12, Chris Angelico wrote: >> https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/ > > """It would also be reasonable to assume that any sane language > runtime would have integers transparently degrade to BIGNUMs, making > the

Re: Assignment Versus Equality

2016-06-28 Thread Random832
On Tue, Jun 28, 2016, at 22:27, Steven D'Aprano wrote: > Are you suggesting that email clients and newsreaders should silently > mangle the text of your message behind your back? Because that's what > it sounds like you're saying. That was how I was characterizing Rustom Mody's position; he

Re: Assignment Versus Equality

2016-06-28 Thread Chris Angelico
On Wed, Jun 29, 2016 at 12:35 PM, Steven D'Aprano wrote: > > Whereas some decisions are just dumb: > > https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/ """It would also be reasonable to assume that any sane language runtime would have integers

[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry
Emanuel Barry added the comment: That is good to know, thanks Eryk for the explanation! I also think making Python set LC_CTYPE on startup on Windows would be good. Martin's comment got me wondering, so I'm going to try to see if all modules properly got re-compiled, and re-run tests. I'll

Re: Assignment Versus Equality

2016-06-28 Thread Rustom Mody
On Wednesday, June 29, 2016 at 9:27:44 AM UTC+5:30, Rustom Mody wrote: > On Wednesday, June 29, 2016 at 7:58:04 AM UTC+5:30, Steven D'Aprano wrote: > > This is not a good idea. > [This is an experiment :-) ] Um... So now its working ie the offensive behavior (to me also) that Steven described is

Re: Assignment Versus Equality

2016-06-28 Thread Rustom Mody
On Wednesday, June 29, 2016 at 7:58:04 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 29 Jun 2016 12:13 am, Random832 wrote: > > > On Tue, Jun 28, 2016, at 00:31, Rustom Mody wrote: > >> GG downgrades posts containing unicode if it can, thereby increasing > >> reach to recipients with

[issue26226] Various test suite failures on Windows

2016-06-28 Thread Eryk Sun
Eryk Sun added the comment: time.strftime calls the CRT's strftime function, which the Windows universal CRT implements by calling wcsftime and encoding the result. The timezone name is actually stored as a char string (tzname), so wcsftime has to decode it via mbstowcs. The problem is that

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat
Changes by anandbhat : Added file: http://bugs.python.org/file43576/Python_3.5.2_64_exe_DLL_Hijack.PNG ___ Python tracker ___

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat
Changes by anandbhat : Removed file: http://bugs.python.org/file43574/Python_3.5.2_64_exe_DLL_Hijack.PNG ___ Python tracker ___

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat
Changes by anandbhat : Added file: http://bugs.python.org/file43575/Python_3.5.2_64_exe_version_DLL_Hijack.PNG ___ Python tracker ___

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-28 Thread anandbhat
New submission from anandbhat: The Python 3.5.2 Windows x86-64 executable installer (MD5: 4da6dbc8e43e2249a0892d257e977291) downloaded from https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe is vulnerable to DLL hijacking. The installer attempts to load DLLs from the current

[issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols

2016-06-28 Thread Martin Panter
New submission from Martin Panter: The documentation just says that SO_* etc constants are defined. However when people add new ones, they add them as new features to a specific version (not backported as bug fixes), but do not alter the documentation at all. IMO it is silly adding

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-28 Thread Steven D'Aprano
On Wed, 29 Jun 2016 11:41 am, jf...@ms4.hinet.net wrote: > Anyone who wrote the code below must be insane:-) > > for x in range(3): > print(x) > else: > print('I am done') *shrug* Insane or not, it's legal. import math pass import os pass import sys is "insane" too,

[issue1732367] Document the constants in the socket module

2016-06-28 Thread Martin Panter
Martin Panter added the comment: Reopening because the consensus seems to be to update and apply this sort of change. -- nosy: +martin.panter stage: -> needs patch status: closed -> open ___ Python tracker

Re: Assignment Versus Equality

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 12:10 am, Rustom Mody wrote: > Analogy: Python's bool as 1½-class because bool came into python a good > decade after python and breaking old code is a bigger issue than fixing > control constructs to be bool-strict That analogy fails because Python bools being implemented as

Re: Assignment Versus Equality

2016-06-28 Thread Steven D'Aprano
On Wed, 29 Jun 2016 12:13 am, Random832 wrote: > On Tue, Jun 28, 2016, at 00:31, Rustom Mody wrote: >> GG downgrades posts containing unicode if it can, thereby increasing >> reach to recipients with unicode-broken clients > > That'd be entirely reasonable, except for the excessively broad >

[issue27408] Document importlib.abc.ExecutionLoader implements get_data()

2016-06-28 Thread Brett Cannon
New submission from Brett Cannon: The fact that importlib.abc.ExectionLoader.get_data() is implemented is missing (or put another way, it isn't documented that get_source() still needs to be implemented). -- assignee: docs@python components: Documentation messages: 269458 nosy:

Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-28 Thread Umar Yusuf
Websites to learn python programming? Try these links:- http://umar-yusuf.blogspot.com.ng/2016/03/70-free-python-programming-language.html http://www.sololearn.com/Course/Python/ http://www.afterhoursprogramming.com/tutorial/Python/Overview/ http://www.pyschools.com/ --

"for/while ... break(by any means) ... else" make sense?

2016-06-28 Thread jfong
Anyone who wrote the code below must be insane:-) for x in range(3): print(x) else: print('I am done') But here it seems perfectly OK: for x in range(3): print(x) if x == 1: break else: print('I am done') To me, the "else" was bonded

[issue19802] socket.SO_PRIORITY is missing

2016-06-28 Thread Larry Hastings
Larry Hastings added the comment: Sorry, this is now too late for 3.4. 3.4 is now in "security fixes only" mode. This is not a security fix, therefore 3.4 is now ineligible. Since this change was committed to 3.5, it's better to let the historical record reflect that. So I'm changing the

[issue19802] socket.SO_PRIORITY is missing

2016-06-28 Thread Martin Panter
Changes by Martin Panter : -- versions: +Python 3.4 -Python 3.5 ___ Python tracker ___

Re: Sharing package data across files

2016-06-28 Thread scottpakin1
Steven, Very helpful! Thanks for the thorough explanation. -- Scott -- https://mail.python.org/mailman/listinfo/python-list

[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-06-28 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

Re: Sharing package data across files

2016-06-28 Thread Steven D'Aprano
On Wed, 29 Jun 2016 09:51 am, scottpak...@gmail.com wrote: > On Tuesday, June 28, 2016 at 4:37:45 PM UTC-6, Michael Selik wrote: >> Why do you want to? > > I have a standalone script that grew and grew until reaching an > unmaintainable size. I was hoping to refactor it into a relatively small

Re: Assignment Versus Equality

2016-06-28 Thread Lawrence D’Oliveiro
On Tuesday, June 28, 2016 at 10:35:21 PM UTC+12, Chris Angelico wrote: > On Tue, Jun 28, 2016 at 6:49 PM, Lawrence D’Oliveiro wrote: > > On Tuesday, June 28, 2016 at 7:26:30 PM UTC+12, Chris Angelico wrote: >>> Why not: >>> >>> if (error) goto cleanup; >>> ... >>> cleanup: >>> do_cleanup; >> >>

Re: Sharing package data across files

2016-06-28 Thread Steven D'Aprano
On Wed, 29 Jun 2016 08:07 am, John Pote wrote: >> from foo import bar >> bar = "oranges" >> >> No code outside of a will see bar as "oranges" because my setting of bar >> merely affected the name "bar" inside module a, it did not "reach into" >> the foo module object and update its "bar".

[issue27377] Add smarter socket.fromfd()

2016-06-28 Thread Martin Panter
Martin Panter added the comment: The s.detach() thing isn’t a big deal, but I thought it would simplify the code (eliminate the need for the “finally” clause). I will try to propose a minor documentation update for SO_PASSCRED as a starting point for adding the others. --

Re: Sharing package data across files

2016-06-28 Thread scottpakin1
On Tuesday, June 28, 2016 at 5:20:16 PM UTC-6, John Pote wrote: > Correct me if I'm wrong but is not the above only true if bar has been > assigned to and thus references an imutable object? In your example the > string "oranges". > If bar has been assigned to a mutable object in module foo then

Re: Sharing package data across files

2016-06-28 Thread scottpakin1
On Tuesday, June 28, 2016 at 4:37:45 PM UTC-6, Michael Selik wrote: > Why do you want to? I have a standalone script that grew and grew until reaching an unmaintainable size. I was hoping to refactor it into a relatively small top-level script plus a package containing a bunch of relatively

[issue26226] Various test suite failures on Windows

2016-06-28 Thread Martin Panter
Martin Panter added the comment: test_distutils: Is the failure the same as before, or changed? Are you testing with new code that includes the Issue 27048 fix? It looks like test_distutils doesn’t support running directly via “unittest”. Perhaps try “python -m test -W test_distutils” or

Re: Sharing package data across files

2016-06-28 Thread John Pote
On 28/06/2016 20:55, zackba...@gmail.com wrote: On Tuesday, June 28, 2016 at 1:17:23 PM UTC-6, scott...@gmail.com wrote: I'm trying to create a package in which the constituent files share some state. Apparently, I don't understand scopes, namespaces, and package semantics as well as I

[issue27384] itertools islice consumes items when given negative range

2016-06-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: "Surprising" is in the eye of the beholder. Having islice() always consume at least "start" number of values seems reasonable enough and it is the documented behavior: "If start is non-zero, then elements from the iterable are skipped until start is

Re: Sharing package data across files

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 3:21 PM wrote: > I'm trying to create a package in which the constituent files share some > state. Apparently, I don't understand scopes, namespaces, and package > semantics as well as I thought I did. Here's the directory structure for a >

[issue4945] json checks True/False by identity, not boolean value

2016-06-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: These latest two patches look fine. Go ahead with them. -- ___ Python tracker ___

[issue26844] Wrong error message during import

2016-06-28 Thread Brett Cannon
Brett Cannon added the comment: Should we use __qualname__ instead of __name__? And I haven't forgotten about your patch, Lev. I'm just occupied trying to get feature changes into Python 3.6 as that has a sooner deadline than bug fixes. -- ___

Re: Assignment Versus Equality

2016-06-28 Thread Gene Heskett
On Tuesday 28 June 2016 15:40:48 Marko Rauhamaa wrote: > Ian Kelly : > > On Tue, Jun 28, 2016 at 10:39 AM, Marko Rauhamaa wrote: > >> Inside the probe, we have a powerful electrical magnet that our > >> compass can detect from a safe distance away. > >>

[issue27377] Add smarter socket.fromfd()

2016-06-28 Thread Neil Schemenauer
Neil Schemenauer added the comment: I've revised the patch based on the second round of comments from Martin. I've removed the ifdef test for CO_TYPE and assumed it is always available. That means fdtype() should be available on all platforms. I did not change the test as suggested to call

Re: Sharing package data across files

2016-06-28 Thread zackbaker
On Tuesday, June 28, 2016 at 1:17:23 PM UTC-6, scott...@gmail.com wrote: > I'm trying to create a package in which the constituent files share some > state. Apparently, I don't understand scopes, namespaces, and package > semantics as well as I thought I did. Here's the directory structure for

Re: Assignment Versus Equality

2016-06-28 Thread Marko Rauhamaa
Ian Kelly : > On Tue, Jun 28, 2016 at 10:39 AM, Marko Rauhamaa wrote: >> Inside the probe, we have a powerful electrical magnet that our >> compass can detect from a safe distance away. >> >> [...] >> >> The compass needle shows that the probe is "frozen"

Sharing package data across files

2016-06-28 Thread scottpakin1
I'm trying to create a package in which the constituent files share some state. Apparently, I don't understand scopes, namespaces, and package semantics as well as I thought I did. Here's the directory structure for a simplified example: example/ __init__.py vars.py

[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Zachary Ware
Zachary Ware added the comment: You can also use PC/VS9.0/build_ssl.py which was the progenitor of prepare_ssl.py. The project files in PC/VS9.0 will use build_ssl.py by default. FTR, I'm good with copying prepare_ssl.py to 2.7, and even with ensuring that it's 2.7 compatible (it probably

[issue27383] executuable in distutils triggering microsoft anti virus

2016-06-28 Thread Rob Bairos
Rob Bairos added the comment: Great. Thanks for the update On Tue, Jun 28, 2016 at 2:37 PM, Steve Dower wrote: > > Steve Dower added the comment: > > FYI the definitions have been updated and I'm no longer seeing the false > positive. > > Definition version:

[issue27383] executuable in distutils triggering microsoft anti virus

2016-06-28 Thread Steve Dower
Steve Dower added the comment: FYI the definitions have been updated and I'm no longer seeing the false positive. Definition version: 1.223.2858.0 -- ___ Python tracker

Re: Assignment Versus Equality

2016-06-28 Thread Ian Kelly
On Tue, Jun 28, 2016 at 10:39 AM, Marko Rauhamaa wrote: > > (sorry for the premature previous post) > > Random832 : >> All objects, not just black holes, have those properties. The point >> here is that we are in fact observing those properties of an

Re: Processing text data with different encodings

2016-06-28 Thread Chris Angelico
On Wed, Jun 29, 2016 at 1:52 AM, Random832 wrote: > On Tue, Jun 28, 2016, at 06:25, Chris Angelico wrote: >> For the OP's situation, frankly, I doubt there'll be anything other >> than UTF-8, Latin-1, and CP-1252. The chances that someone casually >> mixes CP-1252 with

Re: Iteration, while loop, and for loop

2016-06-28 Thread Grant Edwards
On 2016-06-28, Tim Chase wrote: > On 2016-06-29 01:20, Steven D'Aprano wrote: >> While loops are great for loops where you don't know how many >> iterations there will be but you do know that you want to keep >> going while some condition applies: >> >> while there

Re: Iteration, while loop, and for loop

2016-06-28 Thread Tim Chase
On 2016-06-29 01:20, Steven D'Aprano wrote: > While loops are great for loops where you don't know how many > iterations there will be but you do know that you want to keep > going while some condition applies: > > while there is still work to be done: > do some more work I find this

Re: Assignment Versus Equality

2016-06-28 Thread Random832
On Tue, Jun 28, 2016, at 12:39, Marko Rauhamaa wrote: > A physicist once clarified to me that an almost-black-hole is > practically identical with a black hole because all information about > anything falling in is very quickly red-shifted to oblivion. Subject to some definition of "quickly" and

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0aec17c8f434 by Guido van Rossum in branch '3.5': Fix issue #27402: example for typing did not type-check. https://hg.python.org/cpython/rev/0aec17c8f434 New changeset 57f3514564f6 by Guido van Rossum in branch 'default': Fix issue #27402: example

Re: Can math.atan2 return INF?

2016-06-28 Thread Marko Rauhamaa
(sorry for the premature previous post) Random832 : > All objects, not just black holes, have those properties. The point > here is that we are in fact observing those properties of an object > that is not yet (and never will be) a black hole in our frame of > reference.

Re: Assignment Versus Equality

2016-06-28 Thread Marko Rauhamaa
Marko Rauhamaa : > (sorry for the premature previous post) Screw it! Wrong thread! Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Can math.atan2 return INF?

2016-06-28 Thread Marko Rauhamaa
Random832 : > All objects, not just black holes, have those properties. The point > here is that we are in fact observing those properties of an object > that is not yet (and never will be) a black hole in our frame of > reference. A physicist once clarified to me that an

Re: Assignment Versus Equality

2016-06-28 Thread Marko Rauhamaa
(sorry for the premature previous post) Random832 : > All objects, not just black holes, have those properties. The point > here is that we are in fact observing those properties of an object > that is not yet (and never will be) a black hole in our frame of > reference.

[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Steve Dower
Steve Dower added the comment: It would need someone to volunteer to port and maintain it. I don't believe any of the current team want to maintain two different versions of the script, considering we all use Python 3 and have it available when updating the version of OpenSSL used.

[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread George Ge
George Ge added the comment: I see. Would it be possible to have a version of prepare_ssl.py written in 2.7 for the official source releases? -- ___ Python tracker

[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread Steve Dower
Steve Dower added the comment: It can be found at PCbuild/prepare_ssl.py in the default branch. Copying it into the 2.7 branch wouldn't hurt I guess, and I'm okay with having build scripts in there that depend on Python 3 ;) -- ___ Python tracker

[issue27337] 3.6.0a2 tarball has weird paths

2016-06-28 Thread Ulrich Petri
Ulrich Petri added the comment: Just as another datapoint: This also breaks installing a2 with pythonz. -- nosy: +ulope ___ Python tracker ___

Re: Processing text data with different encodings

2016-06-28 Thread Random832
On Tue, Jun 28, 2016, at 06:25, Chris Angelico wrote: > For the OP's situation, frankly, I doubt there'll be anything other > than UTF-8, Latin-1, and CP-1252. The chances that someone casually > mixes CP-1252 with (say) CP-1254 would be vanishingly small. So the > simple decode of "UTF-8, or

[issue27407] prepare_ssl.py missing in PCBuild folder

2016-06-28 Thread George Ge
New submission from George Ge: The readme.txt file in the PCBuild folder in Python 2.7.11 and 2.7.12 sources both contain instructions on how to configure to build a different OpenSSL version using PCbuild\prepare_ssl.py, but this file is missing on both versions. -- components:

[issue23749] asyncio missing wrap_socket (starttls)

2016-06-28 Thread Yury Selivanov
Yury Selivanov added the comment: > yuri, did you saw guido added review on your patch? Yes. There are few more issues with the patch that I want to resolve before re-submitting it for another review. Will do it soon. -- ___ Python tracker

Re: __all__ attribute: bug and proposal

2016-06-28 Thread Ethan Furman
On 06/27/2016 09:31 PM, Zachary Ware wrote: On Mon, Jun 27, 2016 at 7:32 PM, Chris Angelico wrote: If you're primarily worried about classes and functions, here's a neat trick you can use: __all__ = [] def all(thing): __all__.append(thing.__name__) return thing Barry Warsaw has

Re: Iteration, while loop, and for loop

2016-06-28 Thread Jussi Piitulainen
Steven D'Aprano writes: > While loops are great for loops :) Thanks, I needed the laugh. > where you don't know how many iterations there will be but you do know > that you want to keep going while some condition applies: (Just keeping a bit of context so it doesn't seem like I'm laughing at

Re: Can math.atan2 return INF?

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 11:39 pm, Random832 wrote: > On Sun, Jun 26, 2016, at 22:59, Steven D'Aprano wrote: >> We have no way of seeing what goes on past the black hole's event >> horizon, since light cannot escape. But we can still see *some* >> properties of black holes, even through their event

Re: Iteration, while loop, and for loop

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 10:36 pm, Elizabeth Weiss wrote: > Why do we use this code if we can use the simpler for loop? Nobody with any sense would use the more complex while loop when the for loop does the same thing. While loops are great for loops where you don't know how many iterations there

[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file43571/groupbydoc.diff ___ Python tracker ___

[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: That's okay. I'm taking care of both in this issue. -- ___ Python tracker ___

[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry
Emanuel Barry added the comment: About the strptime failure - it seems time.strftime returns "Est (heure d?été)" while _strptime.LocaleTime().timezone has "est (heure d\x92été)". I don't know why it's like that, but neither are correct - the character that goes there is a single quote (').

Re: Processing text data with different encodings

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 10:30 pm, Michael Welle wrote: > I changed the code from my initial mail to: > > LOGGER = logging.getLogger() > LOGGER.addHandler(logging.FileHandler("tmp.txt", encoding="utf-8")) > > for l in sys.stdin.buffer: > l = l.decode('utf-8') > LOGGER.critical(l) I imagine

Re: Processing text data with different encodings

2016-06-28 Thread Random832
On Tue, Jun 28, 2016, at 10:52, Steven D'Aprano wrote: > "you will find THREE OR FOUR different encodings in one email. > I think at the sending side they just glue different text > fragments from different sources together without thinking > about the encoding" > > But I'm not

[issue26226] Various test suite failures on Windows

2016-06-28 Thread Emanuel Barry
Emanuel Barry added the comment: Some of the tests that used to fail are now passing, however some are still failing (and new ones are also failing now). Tests that are still failing: test_code_module (TestInteractiveConsole; test_ps1 and test_ps2 failed) test_codecencodings_iso2022 (blame

!! Immediate Requirement: QlikView consultant with JDE experience (Somerset, NJ ) !!

2016-06-28 Thread sourav524 . itscient
Hi All Please revert me: soura...@itscient.com or sourav524.itsci...@gmail.com If i miss your call pls mail me. Position: QlikView consultant with JDE experience Location: Somerset, NJ Duration: 6+ Month Mandatory Skill : JD Edwards 9.1 ERP Overall experience of 8-10 yrs of experience

Re: Processing text data with different encodings

2016-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2016 10:30 pm, Michael Welle wrote: > I look at the hex values of the bytes, get the win-1252 table and > translate the bytes to chars. If the result makes sense, it's win-1252 > (and maybe others, if the tables overlap). So in that sense I know what > I have. I least for this

[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread R. David Murray
R. David Murray added the comment: Please open a separate issue for that problem. -- nosy: +r.david.murray ___ Python tracker ___

Re: fastest way to read a text file in to a numpy array

2016-06-28 Thread Cody Piersall
On Tue, Jun 28, 2016 at 8:45 AM, Heli wrote: > Hi, > > I need to read a file in to a 2d numpy array containing many number of lines. > I was wondering what is the fastest way to do this? > > Is even reading the file in to numpy array the best method or there are > better

[issue27385] itertools.groupby has misleading doc string

2016-06-28 Thread Josh Rosenberg
Josh Rosenberg added the comment: While you're fixing, the docstring should say "groupby(iterable, key=None)", not "groupby(iterable[, keyfunc])"; the functions accepts the key function by name, and the name is key, not keyfunc. And it can be passed explicitly as None (equivalent to not

Re: fastest way to read a text file in to a numpy array

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 10:08 AM Hedieh Ebrahimi wrote: > File 1 has : > x1,y1,z1 > x2,y2,z2 > > > and file2 has : > x1,y1,z1,value1 > x2,y2,z2,value2 > x3,y3,z3,value3 > ... > > I need to read the coordinates from file 1 and then interpolate a value > for these

Re: Assignment Versus Equality

2016-06-28 Thread Random832
On Tue, Jun 28, 2016, at 00:31, Rustom Mody wrote: > GG downgrades posts containing unicode if it can, thereby increasing > reach to recipients with unicode-broken clients That'd be entirely reasonable, except for the excessively broad application of "if it can". Certainly it _can_ do it all the

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-06-28 Thread Rolf Krahl
Rolf Krahl added the comment: Martin, I'm almost through with your comments. There is however one item that I need some feedback on: You asked for more documentation on the new EncodingError exception. This was introduced by Demian. It is raised when the Transfer-encoding header set by the

[issue27406] subprocess.Popen() hangs in multi-threaded code

2016-06-28 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 20318. The advice is to use subprocess32. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess.Popen can hang in threaded applications in Python 2

Re: fastest way to read a text file in to a numpy array

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 9:51 AM Heli wrote: > Is even reading the file in to numpy array the best method or there are > better approaches? > What are you trying to accomplish? Summary statistics, data transformation, analysis...? --

[issue27406] subprocess.Popen() hangs in multi-threaded code

2016-06-28 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson: On a quad-core raspberrypi, i have experienced that subprocess.Popen() sometimes does not return immediatelly, but only much later, when an unrelated process has exited. Debugging the issue, I find the parent process hanging in #

[issue26226] Various test suite failures on Windows

2016-06-28 Thread R. David Murray
R. David Murray added the comment: It looks like this issue can be closed, but a new one should be opened for dealing with the newline issue under git on windows. However, I'm surprised there weren't failures in the email tests. Although I've been moving the email tests away from depending

Re: Iteration, while loop, and for loop

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 9:26 AM Joseph Lee wrote: > > -Original Message- > From: Michael Selik > Sent: Tuesday, June 28, 2016 6:16 AM > > MS: You should not. Use the first version, it's much better. Python > for-loops are preferable to while-loops. > > JL: For

Re: Iteration, while loop, and for loop

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 9:34 AM BartC wrote: > On 28/06/2016 14:15, Michael Selik wrote: > > On Tue, Jun 28, 2016 at 8:41 AM Elizabeth Weiss > wrote: > > > >> I do not understand the second code. What is counter? > >> > > > > It looks like someone wanted to

fastest way to read a text file in to a numpy array

2016-06-28 Thread Heli
Hi, I need to read a file in to a 2d numpy array containing many number of lines. I was wondering what is the fastest way to do this? Is even reading the file in to numpy array the best method or there are better approaches? Thanks for your suggestions, --

Re: Iteration, while loop, and for loop

2016-06-28 Thread Jussi Piitulainen
Elizabeth Weiss writes: [- -] > What I do not understand is: > > words=["hello", "world", "spam", "eggs"] > counter=0 > max_index=len(words)-1 > > while counter<=max_index: >word=words[counter] >print(word + "!") >counter=counter + 1 # make it so that counter == 0 counter=0 # make

Re: Can math.atan2 return INF?

2016-06-28 Thread Random832
On Sun, Jun 26, 2016, at 22:59, Steven D'Aprano wrote: > We have no way of seeing what goes on past the black hole's event > horizon, since light cannot escape. But we can still see *some* > properties of black holes, even through their event horizon: their > mass, any electric charge they may

Re: What the deal with python3.5m.so and python3.5.so ??

2016-06-28 Thread eryk sun
On Tue, Jun 28, 2016 at 10:51 AM, Steven Truppe wrote: > > can someone tell me the difference between python3.5m.so and python3.5.so ?? The "m" suffix means that Python is configured "--with-pymalloc", i.e. using specialized mallocs, including the small-object allocator.

Re: Iteration, while loop, and for loop

2016-06-28 Thread BartC
On 28/06/2016 14:15, Michael Selik wrote: On Tue, Jun 28, 2016 at 8:41 AM Elizabeth Weiss wrote: I do not understand the second code. What is counter? It looks like someone wanted to make a loop induction variable. https://en.wikipedia.org/wiki/Induction_variable I

RE: Iteration, while loop, and for loop

2016-06-28 Thread Joseph Lee
Hi, Answers inline. -Original Message- From: Python-list [mailto:python-list-bounces+joseph.lee22590=gmail@python.org] On Behalf Of Michael Selik Sent: Tuesday, June 28, 2016 6:16 AM To: Elizabeth Weiss ; python-list@python.org Subject: Re: Iteration, while loop,

Re: Iteration, while loop, and for loop

2016-06-28 Thread BartC
On 28/06/2016 13:36, Elizabeth Weiss wrote: I understand this code: words=["hello", "world", "spam", "eggs"] for words in words print(word + "!") What I do not understand is: words=["hello", "world", "spam", "eggs"] counter=0 max_index=len(words)-1 while counter<=max_index:

Re: Iteration, while loop, and for loop

2016-06-28 Thread Michael Selik
On Tue, Jun 28, 2016 at 8:41 AM Elizabeth Weiss wrote: > I do not understand the second code. What is counter? > It looks like someone wanted to make a loop induction variable. https://en.wikipedia.org/wiki/Induction_variable > Why do we use this code if we can use the

Iteration, while loop, and for loop

2016-06-28 Thread Elizabeth Weiss
I understand this code: words=["hello", "world", "spam", "eggs"] for words in words print(word + "!") What I do not understand is: words=["hello", "world", "spam", "eggs"] counter=0 max_index=len(words)-1 while counter<=max_index: word=words[counter] print(word + "!")

[RELEASE] Python 2.7.12

2016-06-28 Thread Benjamin Peterson
It is my privilege to present you with another release in the Python 2.7 series, Python 2.7.12. Since the release candidate, there were two changes: - The Windows binaries have been changed to use OpenSSL 1.0.2h. - The "about" dialog in IDLE was fixed. Downloads, as always, are on python.org:

  1   2   >