[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-28 Thread Nathaniel Smith
Nathaniel Smith added the comment: Given the complexities here, and that the Track/Untrack functions are public now, I do wonder if the actual aligned allocation routines should just be an internal API (i.e., not exposed in Python.h). --

[issue31304] Update doc for starmap_async error_back kwarg

2017-10-28 Thread Berker Peksag
Change by Berker Peksag : -- keywords: +easy stage: -> needs patch versions: +Python 3.7 ___ Python tracker ___

[issue31065] Documentation for Popen.poll is unclear

2017-10-28 Thread Berker Peksag
Berker Peksag added the comment: I've backported 006617ff7d6df3fdedcfe53e94ee2c52cc796437 to 3.6. I think this can be closed now, thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions:

[issue31065] Documentation for Popen.poll is unclear

2017-10-28 Thread Berker Peksag
Berker Peksag added the comment: New changeset 0f1973d06e2116deafb19bbb9443b138187803c7 by Berker Peksag in branch '3.6': bpo-31065: Add doc about Popen.poll returning None. (GH-3169) https://github.com/python/cpython/commit/0f1973d06e2116deafb19bbb9443b138187803c7

[issue31065] Documentation for Popen.poll is unclear

2017-10-28 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +4130 stage: -> patch review ___ Python tracker ___

[issue30987] Support for ISO-TP protocol in SocketCAN

2017-10-28 Thread Berker Peksag
Berker Peksag added the comment: PR 2956 has been merged. Christian, can this issue be closed now? -- nosy: +berker.peksag ___ Python tracker

Re: Compression of random binary data

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 2:08 PM, Gregory Ewing wrote: > Stefan Ram wrote: >> >> Well, then one can ask about the entropy of a data source >> that only is emitting this message. > > > You can, but it's still the *source* that has the entropy, > not the message. > >

Re: Compression of random binary data

2017-10-28 Thread Gregory Ewing
Steve D'Aprano wrote: I don't think that's right. The entropy of a single message is a well-defined quantity, formally called the self-information. https://en.wikipedia.org/wiki/Self-information True, but it still depends on knowing (or assuming) the probability of getting that particular

[issue1447222] tkinter Dialog fails when more than four buttons are used

2017-10-28 Thread Berker Peksag
Berker Peksag added the comment: I ported OP's example to Python 3 and I agree with Cheryl that this is fixed now. -- nosy: +berker.peksag resolution: -> out of date stage: patch review -> resolved status: open -> closed Added file:

Re: Compression of random binary data

2017-10-28 Thread Gregory Ewing
Stefan Ram wrote: Well, then one can ask about the entropy of a data source that only is emitting this message. You can, but it's still the *source* that has the entropy, not the message. (And the answer in that case is that the entropy is zero. If there's only one possible message you

[issue22671] Typo in class io.BufferedIOBase docs

2017-10-28 Thread Martin Panter
Martin Panter added the comment: I’m unlikely to soon, but I don’t mind if someone else uses my patch. -- ___ Python tracker ___

Re: Compression of random binary data

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 1:32 PM, Chris Angelico wrote: > On Sun, Oct 29, 2017 at 1:18 PM, Gregory Ewing > wrote: >> You're missing something fundamental about what >> entropy is in information theory. >> >> It's meaningless to talk about the entropy

[issue31273] Unicode support in TestCase.skip

2017-10-28 Thread Berker Peksag
Change by Berker Peksag : -- components: +Library (Lib) -Tests, Unicode nosy: +michael.foord, rbcollins stage: -> needs patch type: crash -> behavior ___ Python tracker

Re: Compression of random binary data

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 1:18 PM, Gregory Ewing wrote: > You're missing something fundamental about what > entropy is in information theory. > > It's meaningless to talk about the entropy of a single > message. Entropy is a function of the probability > distribution of

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2017-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking back to my signal processing days, I have to agree that our weightings (filter definitions) were usually separate from our data (live signals). Similarly, systems engineering trade studies all maintained feature weights separately

Re: Compression of random binary data

2017-10-28 Thread Gregory Ewing
Steve D'Aprano wrote: Random data = any set of data generated by "a source of random". Any set of data generated by Grant Thompson? https://www.youtube.com/user/01032010814 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Compression of random binary data

2017-10-28 Thread Gregory Ewing
danceswithnumb...@gmail.com wrote: 10101011 This equals 61611 This can be represented using 0-6 log2(7)*5= 14.0367746103 bits 11010101 This equals 54543 This can be represented using 0-5 log2(6)*5= 12.9248125036 bits You're missing something fundamental about what entropy

Re: Coding style in CPython implementation

2017-10-28 Thread Dan Sommers
On Sat, 28 Oct 2017 16:20:54 -0700, Στέφανος Σωφρονίου wrote: > I do believe though that if (!d) is a lot clearer than if (d == NULL) > as it is safer than falsely assigning NULL in d, by pure mistake. Having made my living writing C code for a very long time, I always found if (!d) *harder* to

Re: Compression of random binary data

2017-10-28 Thread Gregory Ewing
Ben Bacarisse wrote: But that has to be about the process that gives rise to the data, not the data themselves. If I say: "here is some random data..." you can't tell if it is or is not from a random source. I can, as a parlour trick, compress and recover this "random data" because I chose

Re: Compression of random binary data

2017-10-28 Thread Ian Kelly
On Oct 28, 2017 10:30 AM, "Stefan Ram" wrote: > Well, then one can ask about the entropy of a data source > thatt only is emitting this message. (If it needs to be endless: > thatt only is emitting this message repeatedly.) If there is only one possible message then the

[issue28197] range.index mismatch with documentation

2017-10-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

Re: Compression of random binary data

2017-10-28 Thread Steve D'Aprano
On Sun, 29 Oct 2017 07:03 am, Peter Pearson wrote: > On Thu, 26 Oct 2017 19:26:11 -0600, Ian Kelly wrote: >> >> . . . Shannon entropy is correctly calculated for a data source, >> not an individual message . . . > > Thank you; I was about to make the same observation.

Re: Repairing Python installation?

2017-10-28 Thread Percival John Hackworth
On 28-Oct-2017, Martin Schöön wrote (in article ): > It seems something is amiss with my Python 2.7 installation. Revisiting > Nikola (static web site generator written in Python) for the first time > in several years the other day I experience some unexpected

Re: Coding style in CPython implementation

2017-10-28 Thread Στέφανος Σωφρονίου
On Saturday, October 28, 2017 at 9:54:30 PM UTC+3, bartc wrote: > On 28/10/2017 19:42, Στέφανος Σωφρονίου wrote: > > Greetings everyone. > > > > I have noticed that in many if conditions the following syntax is used: > > > > a) if (variable == NULL) { ... } > > b) if (variable == -1) { ... } > >

Re: Problem with subprocess.Popen and EINTR

2017-10-28 Thread Cameron Simpson
On 28Oct2017 23:56, Piet van Oostrum wrote: I am using Python 2.7.14 on MacOS Sierra. I have a small Python program that calls a shell script in a loop with a time.sleep() in it. The shell script is called with subprocess.Popen(), followed by a subprocess.wait(). No

Re: Problem with subprocess.Popen and EINTR

2017-10-28 Thread Cameron Simpson
On 29Oct2017 10:11, Cameron Simpson wrote: It may be a bug. Or it may be a system call which cannot be meaningfulling retried. But had you considered only activating the handler around the sleep? You still need to copy with SIGINT single I infer that you send this from

[issue20047] bytearray partition bug

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a2314283ff87c65e1745a42c2f2b716b1a209128 by Serhiy Storchaka in branch 'master': bpo-20047: Make bytearray methods partition() and rpartition() rejecting (#4158)

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-10-28 Thread Berker Peksag
Berker Peksag added the comment: > Should we backport the fix to Python 3.3 and 3.4 as well? > > I don't think so. I agree with Victor. Closing this as all PRs have been merged. Thank you, all (especially for the documentation update!) -- nosy:

Re: Problem with subprocess.Popen and EINTR

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 8:56 AM, Piet van Oostrum wrote: > I am using Python 2.7.14 on MacOS Sierra. > > I have a small Python program that calls a shell script in a loop with a > time.sleep() in it. > The shell script is called with subprocess.Popen(), followed by a >

Problem with subprocess.Popen and EINTR

2017-10-28 Thread Piet van Oostrum
I am using Python 2.7.14 on MacOS Sierra. I have a small Python program that calls a shell script in a loop with a time.sleep() in it. The shell script is called with subprocess.Popen(), followed by a subprocess.wait(). No information is exchanged with the shell script. Once in a while I send

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-10-28 Thread Tal Einat
Tal Einat added the comment: Regarding the select module, the existing patch moves typedefs and object type declarations to the top of the file with the #include clinic/selectmodule.c.h statement can come afterwards. Should I keep it this way, or instead move the method

Re: Repairing Python installation?

2017-10-28 Thread Karsten Hilbert
On Sat, Oct 28, 2017 at 08:41:34PM +, Martin Schöön wrote: > It seems something is amiss with my Python 2.7 installation. Revisiting > Nikola (static web site generator written in Python) for the first time > in several years the other day I experience some unexpected problems. I > got some

Re: Coding style in CPython implementation

2017-10-28 Thread Ned Batchelder
On 10/28/17 4:26 PM, Stefan Ram wrote: Ned Batchelder writes: On 10/28/17 3:00 PM, Stefan Ram wrote: =?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= writes: What I wanted to ask is, is there a particular reason for not

Repairing Python installation?

2017-10-28 Thread Martin Schöön
It seems something is amiss with my Python 2.7 installation. Revisiting Nikola (static web site generator written in Python) for the first time in several years the other day I experience some unexpected problems. I got some help form the Nikola people and the conclusion is something is broken

[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-10-28 Thread Xavier de Gaye
Change by Xavier de Gaye : -- versions: -Python 3.5 ___ Python tracker ___ ___

[issue20047] bytearray partition bug

2017-10-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: To answer Mark, even though no longer nosy: In general, sequence methods .count, .index, and .__contains__ take sequence members and only members as arguments. Unicode sequences are exceptional because codepoints are not Python objects, so

[issue30696] infinite loop in PyRun_InteractiveLoopFlags()

2017-10-28 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4129 stage: -> patch review ___ Python tracker ___

Re: Coding style in CPython implementation

2017-10-28 Thread Ned Batchelder
On 10/28/17 3:00 PM, Stefan Ram wrote: =?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= writes: What I wanted to ask is, is there a particular reason for not choosing I am not a CPython developer, but here are my 2 cents about the

Re: Compression of random binary data

2017-10-28 Thread Peter Pearson
On Thu, 26 Oct 2017 19:26:11 -0600, Ian Kelly wrote: > > . . . Shannon entropy is correctly calculated for a data source, > not an individual message . . . Thank you; I was about to make the same observation. When people talk about the entropy of a particular message, you

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2017-10-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: My recommendation is to have *weights* as an optional argument: statistics.mean(values, weights=None) While it is tempting to special case dicts and counters, I got feedback from Jake Vanderplas and Wes McKinney that in

ANN: distlib 0.2.6 released on PyPI

2017-10-28 Thread Vinay Sajip via Python-announce-list
I've just released version 0.2.6 of distlib on PyPI [1]. For newcomers,distlib is a library of packaging functionality which is intended to beusable as the basis for third-party packaging tools. The main changes in this release are as follows: * Fixed #99: Updated to handle a case where

EuroPython 2017: Videos for Friday available online

2017-10-28 Thread M.-A. Lemburg
We are pleased to announce the last batch of cut videos for EuroPython 2017. * All 163 EuroPython 2017 videos are now online * To see the new videos, please head over to our EuroPython YouTube channel and select the "EuroPython 2017" playlist. The new videos start at entry 129 in the

ANN: Pandas 0.21.0 Released

2017-10-28 Thread Tom Augspurger
Hi, I'm pleased to announce the availability pandas 0.21.0. This is a major release from 0.20.3 and includes a number of API changes, deprecations, new features, enhancements, and performance improvements along with a large number of bug fixes. We recommend that all users upgrade to this

Re: Ide vs ide

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 6:10 AM, Stefan Ram wrote: > Rustom Mody writes: >>Useful python programs are often small; even tiny > > We must not forget that tiny programs are just large > problems with the size masterfully hidden. > > For

Re: Coding style in CPython implementation

2017-10-28 Thread Chris Angelico
On Sun, Oct 29, 2017 at 5:42 AM, Στέφανος Σωφρονίου wrote: > Greetings everyone. > > I have noticed that in many if conditions the following syntax is used: > > a) if (variable == NULL) { ... } > b) if (variable == -1) { ... } > c) if (variable != NULL) { ... } > >

[issue16994] collections.Counter.least_common

2017-10-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the suggestion, but I'm going to mark it as rejected for the reasons listed in the other posts. -- resolution: -> rejected stage: patch review -> resolved status: pending -> closed

Re: Coding style in CPython implementation

2017-10-28 Thread bartc
On 28/10/2017 19:42, Στέφανος Σωφρονίου wrote: Greetings everyone. I have noticed that in many if conditions the following syntax is used: a) if (variable == NULL) { ... } b) if (variable == -1) { ... } c) if (variable != NULL) { ... } What I wanted to ask is, is there a particular reason for

Coding style in CPython implementation

2017-10-28 Thread Στέφανος Σωφρονίου
Greetings everyone. I have noticed that in many if conditions the following syntax is used: a) if (variable == NULL) { ... } b) if (variable == -1) { ... } c) if (variable != NULL) { ... } What I wanted to ask is, is there a particular reason for not choosing a) if (!variable) { ... } in place

Re: What use is of this 'cast=float ,'?

2017-10-28 Thread Rick Johnson
On Friday, October 27, 2017 at 3:35:45 PM UTC-5, Robert wrote: > I read below code snippet on line. I am interested in the > second of the last line: `cast=float`. I've tried it in > Python. Even simply with: `float` It has no error, but what > use is it? > > self.freqslider=forms.slider( >

sys.path[] question

2017-10-28 Thread ElChino
From the Python2.7 snippet in [1], Python2.7 reports that my sys.path[] contains: f:\ProgramFiler\Python27\lib\site-packages\pyreadline-2.0-py2.7-win32.egg (a .zip-file) But I have also a 'f:\ProgramFiler\Python27\lib\site-packages\pyreadline' directory. With the complete package AFAICS. So

[issue31890] Please define the flag METH_STACKLESS for Stackless Python

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___

[issue31890] Please define the flag METH_STACKLESS for Stackless Python

2017-10-28 Thread Anselm Kruis
Change by Anselm Kruis : -- keywords: +patch pull_requests: +4128 stage: -> patch review ___ Python tracker ___

[issue31890] Please define the flag METH_STACKLESS for Stackless Python

2017-10-28 Thread Anselm Kruis
New submission from Anselm Kruis : The header Include/methodobject.h defines ml_flags METH_xxx. Stackless Python adds the flag METH_STACKLESS. Traditionally Stackless used bit 0x0080 for METH_STACKLESS, but starting with C-Python 3.6 bit 0x0080 is used for

[issue20047] bytearray partition bug

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4127 stage: -> patch review ___ Python tracker ___

Re: Ide vs ide

2017-10-28 Thread Andrew Z
I like this trajectory of conversation. Can we re define "small tiny" as "scripts"? i can argue, based on my expirience with other languages, that there is no need for an "ide". The most ive ever needed is a text editor and a few plugins with "print". Moving to "average" size projects. What i

[issue20047] bytearray partition bug

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker

Re: Compression of random binary data

2017-10-28 Thread Ben Bacarisse
Steve D'Aprano writes: > On Fri, 27 Oct 2017 09:53 am, Ben Bacarisse wrote: > >> A source of random can be defined but "random data" is much more >> illusive. > > Random data = any set of data generated by "a source of random". (I had an editing error there; it

Re: Python noob having a little trouble with strings

2017-10-28 Thread William Ray Wing
OSX has been shipping with Python 2.7 for several years. I’m not sure why you are seeing 2.6. Bill > On Oct 27, 2017, at 2:48 AM, Lutz Horn wrote: > > On Thu, Oct 26, 2017 at 07:59:10PM -0700, randyli...@gmail.com wrote: >> Hi Bob, thanks for responding. I'm not sure

EuroPython 2017: Videos for Friday available online

2017-10-28 Thread M.-A. Lemburg
We are pleased to announce the last batch of cut videos for EuroPython 2017. * All 163 EuroPython 2017 videos are now online * To see the new videos, please head over to our EuroPython YouTube channel and select the "EuroPython 2017" playlist. The new videos start at entry 129 in the

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-10-28 Thread Stefan Krah
Stefan Krah added the comment: Ah sorry, you mean it cannot write the special bytes. -- ___ Python tracker ___

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-10-28 Thread Stefan Krah
Stefan Krah added the comment: > realloc() must not touch the original buffer on failure I don't understand this: If realloc() fails, the original buffer is perfectly valid. -- nosy: +skrah ___ Python tracker

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2017-10-28 Thread Andreas Krüger
Andreas Krüger added the comment: I can easily reproduce the problem with Docker, and it does seem to be a permission problem: $ docker run -ti --rm --user=":" python:3.6.3-jessie bash -c "python3" Python 3.6.3 (default, Oct 10 2017, 02:29:16) [GCC

Re: Compression of random binary data

2017-10-28 Thread Steve D'Aprano
On Fri, 27 Oct 2017 09:53 am, Ben Bacarisse wrote: > A source of random can be defined but "random data" is much more > illusive. Random data = any set of data generated by "a source of random". -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough,

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___

[issue31860] IDLE: Make font sample editable

2017-10-28 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: -4125 ___ Python tracker ___ ___

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-28 Thread David Gabriel
I forget to precise that I am using pycharm. And this issue is reproducible also using command line to run the code. Best regards 2017-10-28 14:31 GMT+02:00 David Gabriel : > Thanks so Lutz much for your reply. > I am using python2.7 and I am running this code in an

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-28 Thread David Gabriel
Thanks so Lutz much for your reply. I am using python2.7 and I am running this code in an Openstack instance. I will apply your recommandation and let you know about the result ... Kind regards. 2017-10-27 16:13 GMT+02:00 Lutz Horn : > On Fri, Oct 27, 2017 at 03:56:39PM

[issue18534] State clearly that open() 'file' param is "name" attr of the result

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue1243730] Big speedup in email message parsing

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-28 Thread Stefan Krah
Stefan Krah added the comment: > The ways we've discussed using aligned allocation in numpy wouldn't follow > this requirement without special checking. Which isn't necessarily a big > deal, and numpy won't necessarily use this API anyway. But I would suggest > being

ANN: distlib 0.2.6 released on PyPI

2017-10-28 Thread Vinay Sajip via Python-list
I've just released version 0.2.6 of distlib on PyPI [1]. For newcomers,distlib is a library of packaging functionality which is intended to beusable as the basis for third-party packaging tools. The main changes in this release are as follows: * Fixed #99: Updated to handle a case where

[issue31775] Support unbuffered TextIOWrapper

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue22671] Typo in class io.BufferedIOBase docs

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR Martin? -- assignee: docs@python -> martin.panter nosy: +serhiy.storchaka versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker

[issue17418] Documentation links for io.open

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue15606] re.VERBOSE whitespace behavior not completely documented

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Steven, would you mind to update your patch according to review comments and create a pull request on GitHub? -- stage: patch review -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.3

[issue31836] test_code_module fails after test_idle

2017-10-28 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31836] test_code_module fails after test_idle

2017-10-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 8ed5644f78e57cd59813097b35906ad6f1775f95 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': bpo-31836: Test_code_module now passes with sys.ps1, ps2 set (GH-4070) (#4156)

Re: Ide vs ide

2017-10-28 Thread Rustom Mody
On Saturday, October 28, 2017 at 4:46:03 PM UTC+5:30, Christian Gollwitzer wrote: > Am 28.10.17 um 09:04 schrieb Rustom Mody: > > [The other day I was writing a program to split alternate lines of a file; > > Apart from file-handling it was these two lines: > > > > for x in lines[0::2]:

[issue16994] collections.Counter.least_common

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This proposition was discussed also on Python-Ideas (https://mail.python.org/pipermail/python-ideas/2017-March/045215.html). I think it should be rejected. In general this doesn't make sense. In rare cases when you want to to

Re: Ide vs ide

2017-10-28 Thread Christian Gollwitzer
Am 28.10.17 um 09:04 schrieb Rustom Mody: [The other day I was writing a program to split alternate lines of a file; Apart from file-handling it was these two lines: for x in lines[0::2]: print(x.strip()) for x in lines[1::2]: print(x.strip()) ] ...and using the best(TM) tool

[issue1617161] Instance methods compare equal when their self's are equal

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Armin, do you mind to create a pull request on GitHub? -- type: enhancement -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

[issue11383] compilation seg faults on insanely large expressions

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If someone will backport an issue5765 patch to 2.7, he can open a new issue or reopen issue5765. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-10-28 Thread Xavier de Gaye
Change by Xavier de Gaye : -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-list

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-10-28 Thread Simon Descarpentries
New submission from Simon Descarpentries : I, it's my 1st post here. I'm a French computer-science engineer with 10 years XP and manager at Acoeuro.com SSLL compagny. I suggested a better regexp integration on python-ideas a few months ago failing to convince getting

[issue31871] Support for file descriptor params in os.path

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Éric, see https://docs.python.org/3/library/os.html#files-and-directories. Yes, now some os.path functions can accept a file descriptor as a path. I don't think this is intentional. And this may not work on all platforms. >>>

testfixtures 5.3.0 released!

2017-10-28 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.3.0 featuring the following: * Add pytest traceback hiding for|TempDirectory.compare()|. * Add warnings that|log_capture()|,|tempdir()|and|replace()|are not currently compatible with pytest’s fixtures mechanism. * Better

Re: Keep or drop index.html from Django?

2017-10-28 Thread Thomas Jollans
On 28/10/17 08:55, Christopher Reimer wrote: > Greetings, > > When I set up my static website using Pelican several years ago, many URLs > ended with index.html. Now that I'm looking at Django, I got a small set of > URLs working with and without index.html to point to the correct pages. > > I

[issue25612] nested try..excepts don't work correctly for generators

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem I mentioned in msg304117 has been resolved in backward direction: "raise" outside of an except block don't raise a RuntimeError. -- status: closed -> open ___ Python

[issue25612] nested try..excepts don't work correctly for generators

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that removing exc_type, exc_value and exc_traceback from PyThreadState breaks Cython. -- nosy: +scoder ___ Python tracker

[issue31888] Creating a UUID with a list throws bad exception

2017-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a consequence of duck-typing and is common in Python. If you pass a value of wrong type, it is expected that you can get an AttributeError. Explicit type checks clutter and slow down the code, and make it less flexible.

Re: Ide vs ide

2017-10-28 Thread Rustom Mody
On Saturday, October 28, 2017 at 11:59:14 AM UTC+5:30, Andrew Z wrote: > Yeah, lets start the war! > // joking! > > But if i think about it... there are tons articles and flame wars about "a > vs b". > And yet, what if the question should be different: > > If you were to create the "ide" for

Keep or drop index.html from Django?

2017-10-28 Thread Christopher Reimer
Greetings, When I set up my static website using Pelican several years ago, many URLs ended with index.html. Now that I'm looking at Django, I got a small set of URLs working with and without index.html to point to the correct pages. I read somewhere that the Django philosophy was to keep the

Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-28 Thread Lutz Horn
On Fri, Oct 27, 2017 at 03:56:39PM +0200, David Gabriel wrote: > from packaging import version as pack_version > ImportError: No module named packaging > > I googled it and I have found so many suggestions regarding updating > 'pip' and installing python-setuptools but all of these did not fix >

Re: Python noob having a little trouble with strings

2017-10-28 Thread Lutz Horn
On Thu, Oct 26, 2017 at 07:59:10PM -0700, randyli...@gmail.com wrote: > Hi Bob, thanks for responding. I'm not sure where to do so, my > professor had us download Pycharm for mac's which uses python 2.6 The code from your question is not specific to Python 2 or 3. Just try it in the Python

Re: SciPy 1.0 released!

2017-10-28 Thread Paul Dubois
The DNA of this work goes much further back. After some discussion as mentioned, Jim Hugunin wrote a numerical extension (called Numerical) and after a bit I took over as its coordinator with financial support for my work from Lawrence Livermore National Laboratory. They also supported the

Ide vs ide

2017-10-28 Thread Andrew Z
Yeah, lets start the war! // joking! But if i think about it... there are tons articles and flame wars about "a vs b". And yet, what if the question should be different: If you were to create the "ide" for yourself (think lego) , what are the functions that you _use_ and like a lot? --

Re: Python noob having a little trouble with strings

2017-10-28 Thread Naman Bhalla
I guess your professor just asked you to download Pycharm. It is just MacOS that happens to have Python 2.6 inbuilt. Had your professor actually wanted you to be using Python 2 (I doubt), that would have been 2.7. Regardless of that I recommend having latest Python 2 or 3 as per your