[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-11 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +3939 ___ Python tracker ___ ___

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Grant Edwards
On 2017-10-12, Steve D'Aprano wrote: > I don't think anyone should expect that platform specific details like the > size of a char should be precisely the same between C and C++. I don't knwo about that. > Even two > different C compilers could return different

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Grant Edwards
On 2017-10-11, Gregory Ewing wrote: > Neil Cerutti wrote: >> I dig >> const qualifiers, even though I'm comletely fine with their >> absence from Python. > > Out of curiosity, do you have any insights into why you > like them in C++, if you don't miss them in Python?

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Grant Edwards
On 2017-10-11, Chris Angelico wrote: > But since it's the lowest-end sites that have traditionally driven > that demand for PHP, there's a general tendency for low-grade > programmers to gravitate to it, so there's a lot of really REALLY bad > code out there. And there are a

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: > Chris Angelico writes: > >> On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: >>> Chris Angelico writes: it binds your URLs to the concrete

[issue30767] logging must check exc_info correctly

2017-10-11 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I decided to do the needed rearrangement of frames in this issue, leaving revision of widgets other than the sample to #24776. PR3960 initially puts the following in the sample box. I believe it should cover most Python users.

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Zachary Ware
Zachary Ware added the comment: Note that your instructions start with downloading the installer for 2.7.0, whereas the latest version of 2.7 is 2.7.14, which includes pip. backports is a strange beast of a package, which tries to emulate Python 3's namespace packages

[issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples

2017-10-11 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +3937 stage: needs patch -> patch review ___ Python tracker ___

Re: Logging from files doesn't work

2017-10-11 Thread Cameron Simpson
On 11Oct2017 22:27, Andrew Z wrote: aha. So the issue is that main.py's __name__ attribute == "__main__" and test.py is "test1.test". Yeah. If you invoke a module as "python -m module_name" its __name__ field is "__main__". That makes the boilerplate work, but breaks your

[issue31769] configure includes user CFLAGS when detecting pthreads support

2017-10-11 Thread Mike Gilbert
Change by Mike Gilbert : -- title: configure includes user CFLAGS testing detecting pthreads support -> configure includes user CFLAGS when detecting pthreads support ___ Python tracker

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki
INADA Naoki added the comment: > So my understand is that gc frees some objects and makes some memory pages > becomes available to allocate in child process. Allocation on the shared > memory pages will cause the copy-on-write even without gc. > > Though this behavior

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Change by Arfrever Frehtes Taifersar Arahesis : -- assignee: -> twouters nosy: +twouters ___ Python tracker ___

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Change by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Louie Lu
Louie Lu added the comment: the format of usage is do at argparse.py:296. So how do we format this kind of situation, to be like this, if the group also too long? usage: test.py [-h] [-v | -q | -x [X] | -y [Y] | Z | Z | Z | Z | Z | Z | Z |

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert
Mike Gilbert added the comment: To resolve this, I suggest clearing CFLAGS/CXXFLAGS before performing the ptheads check, and restoring them afterward. -- ___ Python tracker

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert
Change by Mike Gilbert : Added file: https://bugs.python.org/file47215/configure.log ___ Python tracker ___

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert
Change by Mike Gilbert : Added file: https://bugs.python.org/file47216/build.log ___ Python tracker ___

[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert
New submission from Mike Gilbert : When testing for ptheads support in the compiler, configure includes the CFLAGS value from the environment. If CFLAGS contains -pthread, or an option which implies -pthread (like -fopenmp), this will cause configure to not include

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread ROGER GRAYDON CHRISTMAN
Actually, FORTRAN and COBOL and Algol (for its control structures) Trying to support both of the first two was entertaining -- when you declared a variable, it wasn't enough to say it was an Integer: you had to also declare whether it was represented in Binary or Decimal, and also specify the

[issue14369] make __closure__ writable

2017-10-11 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about the interaction between this idea and https://bugs.python.org/issue30744 made me realise that there's a subtlety here that would probably need to be spelled out more clearly in the docs for __closure__ than it is for

[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Nick Coghlan
Nick Coghlan added the comment: As far as docs phrasing goes, it probably makes sense to frame it as "text" being the preferred argument name in 3.7+, with "universal_newlines" retained indefinitely as a compatibility preserving alias. After all, if that wasn't our

Re: Logging from files doesn't work

2017-10-11 Thread Andrew Z
aha. So the issue is that main.py's __name__ attribute == "__main__" and test.py is "test1.test". if i manually assign names: main.py - > log = logging.getLogger("MAIN") test.py - > log = logging.getLogger("MAIN.test1.test") then logging is working perfectly well. This brings me to the

Re: Logging from files doesn't work

2017-10-11 Thread Andrew Z
if i change print statements in both files to print out "__name__": __main__ test1.test On Wed, Oct 11, 2017 at 10:02 PM, Andrew Z wrote: > Hello, > > apparently my reading comprehension is nose diving these days. After > reading python cookbook and a few other tutorials i

Logging from files doesn't work

2017-10-11 Thread Andrew Z
Hello, apparently my reading comprehension is nose diving these days. After reading python cookbook and a few other tutorials i still can't get a simple logging from a few files to work. I suspected my file organization - all files are in the same directory, causing problem. But it appears it is

[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Tim Peters
Tim Peters added the comment: Sure! The OP was obviously asking about the engine that ships with Python, so that's what I talked about. Raphaël, Matthew develops an excellent replacement ("regex") for Python's re module, which you can install via, e.g., "pip install regex"

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread Zekun Li
Zekun Li added the comment: So what we did is: We keep gc **disabled** on parent process and freeze after warmup, enable gc on child process. The reason not to do a full collection is mentioned in previous comments/original ticket - (I called it) memory fragmentation.

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Steve D'Aprano writes: > On Thu, 12 Oct 2017 02:43 am, Marko Rauhamaa wrote: > >> Chris Angelico : >> >>> The places where C++ is not a superset of C are mostly things you >>> wouldn't want to be doing anyway. You can generally take C code and >>>

[issue31567] Inconsistent documentation around decorators

2017-10-11 Thread Daisuke Miyakawa
Change by Daisuke Miyakawa : -- keywords: +patch pull_requests: +3935 stage: -> patch review ___ Python tracker ___

Re: Looping [was Re: Python and the need for speed]

2017-10-11 Thread Steve D'Aprano
On Wed, 11 Oct 2017 10:57 pm, Stefan Ram wrote: > FWIW, in is book "Touch of Class" (2009) Bertrand Meyer writes: > > |Such instructions are just the old goto in sheep's clothing. > |Treat them the same way as the original: > | > |/Touch of Methodology/: > | Sticking to one-entry, one-exit

Re: Test Bank for Introduction to Sociology 10th Edition by Anthony Giddens

2017-10-11 Thread keishbby
On Wednesday, July 12, 2017 at 5:15:39 PM UTC-4, Test Banks wrote: > Greetings, > > You can get Test Bank for " Introduction to Sociology 10th Edition by Anthony > Giddens, Mitchell Duneier, Richard P. Appelbaum, Deborah Carr " at very > reasonable price. Our team is available 24/7 and 365

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Steve D'Aprano
On Thu, 12 Oct 2017 02:43 am, Marko Rauhamaa wrote: > Chris Angelico : > >> The places where C++ is not a superset of C are mostly things you >> wouldn't want to be doing anyway. You can generally take C code and >> compile it with a C++ compiler, and it'll have the same

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> it binds your URLs to >>> the concrete file system. That may not seem like too much of a >>> problem, but it's a pretty big

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse wrote: > Chris Angelico writes: >> it binds your URLs to >> the concrete file system. That may not seem like too much of a >> problem, but it's a pretty big limitation; you can't have URLs like >>

[issue2506] Add mechanism to disable optimizations

2017-10-11 Thread Alex Gaynor
Alex Gaynor added the comment: If anyone has needed a workaround in the past 9 years and hasn't yet found one: https://github.com/pyca/cryptography/pull/3968/commits/3b585f803891e750d0ca5861b5a29e16b779bc16 -- nosy: +alex ___

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 9:44 AM, Ben Bacarisse wrote: >> Chris Angelico writes: >>> Check out Django and Flask, the two most popular ways. I quite like >>> Flask. >> >> I see. Both appear to be frameworks (I'd

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki
INADA Naoki added the comment: Should gc.freeze() do gc.collect() right before freezing? Or should we document `gc.collect(); gc.freeze();` idiom? I don't like `gc.freeze(collect=False)`. So if there is at least one use case of `gc.freeze()` without `gc.collect()`, I'm

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 11:38 AM, boB Stepp wrote: > On Wed, Oct 11, 2017 at 4:45 PM, Mikhail V wrote: > >> >> PS Off-topic: >> I have a related observation regarding popularity of software. >> There is such a program "VLC", which is a video player.

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Chris Caron
Chris Caron added the comment: Just to point out, i forgot the instructions of installing pip (right before) the following entry in my last post: >> ** Heads up >> So at this point, the C:\Python27\Lib\site-packages will contain the >>> >> following: pip, setuptools, and

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki
INADA Naoki added the comment: >> This is only useful if the parent process has a lot of memory that's never >> used by the child processes right? Otherwise, you would lose via refcounting >> COWs. > > What we saw in prod is that memory fragmentation caused by gc is

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki
INADA Naoki added the comment: As Instagram's report, disabling cycler GC really helps even if there is refcont. All application have some cold data: imported but never used modules, functions. -- ___ Python tracker

[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-11 Thread Ned Deily
Change by Ned Deily : -- components: +Windows -Installation nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-11 Thread boB Stepp
On Wed, Oct 11, 2017 at 4:45 PM, Mikhail V wrote: > > PS Off-topic: > I have a related observation regarding popularity of software. > There is such a program "VLC", which is a video player. Some would > think it is sort of best free player, etc. I was also under

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Ben Bacarisse writes: >>That's a different type. I think you mean that a human writing C >>(rather than bartc's code generator) would probably design the code to >>use tokenrec ** then I agree, but the latter is not just a

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Steven D'Aprano
Change by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 9:44 AM, Ben Bacarisse wrote: > Chris Angelico writes: >> Check out Django and Flask, the two most popular ways. I quite like >> Flask. > > I see. Both appear to be frameworks (I'd heard of Django). Do you know > if they widely

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Christopher Reimer
On Oct 11, 2017, at 9:07 AM, Bill wrote: > > Grant Edwards wrote: >> On 2017-10-11, Bill wrote: >> >> >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast stones at C/C++. >> Not while PHP exists.

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Gregory Ewing writes: > bartc wrote: > >> tokenrec * (*)[] >> >> the original source and that type is written like this: >> >> ref [] ref tokenrec > > The idiomatic way to write that type in C would be > >tokenrec ** That's a different type. I think you

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 7:42 AM, Ben Bacarisse wrote: >> Bill writes: >> >>> Mikhail V wrote: >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Chris Caron
Chris Caron added the comment: -- Download Instructions * 64 Bit ver of Python v2.7 for Windows https://www.python.org/ftp/python/2.7/python-2.7.amd64.msi * Microsoft Visual C++ Compiler for Python 2.7: https://www.microsoft.com/en-ca/download/details.aspx?id=44266. --

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread bartc
On 11/10/2017 23:03, Gregory Ewing wrote: bartc wrote:     tokenrec * (*)[] > the original source and that type is written like this:     ref [] ref tokenrec The idiomatic way to write that type in C would be    tokenrec ** The original has an extra pointer so idiomatic C might be

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Good point. -- ___ Python tracker ___ ___

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman
caveman added the comment: When | is dropped, it means that the arguments/options are no longer mutually exclusive, which renders the resultant help menu incorrect. -- ___ Python tracker

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Removing versions 3.4 and 3.8. Attaching a reproducing script. Run it with a parameter of the number of arguments to add. The behavior changes between 7 and 8, although I'm not sure either is wrong, just different. This is from Windows:

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Gregory Ewing
Neil Cerutti wrote: I dig const qualifiers, even though I'm comletely fine with their absence from Python. Out of curiosity, do you have any insights into why you like them in C++, if you don't miss them in Python? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Gregory Ewing
bartc wrote: tokenrec * (*)[] > the original source and that type is written like this: ref [] ref tokenrec The idiomatic way to write that type in C would be tokenrec ** -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Gregory Ewing
bartc wrote: While on the subject of C syntax, here are some fun ambiguities: f(x);// call function with arg x, or declare x of type f? a*b; // multiply a by b, or declare b of type pointer to a? (a)*b// multiply a by b, or cast *b to type a? Technically these are not ambiguous

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman
caveman added the comment: forgot to add: when you execute the code, pass the argument '-h' in order to have the script generate the help menu text. -- ___ Python tracker

[issue31766] Python 3.5 missing from documentation

2017-10-11 Thread Ned Deily
Ned Deily added the comment: The documentation for 3.5 was deliberated removed from the pull down lists of current docsets as 3.5 is now in security-fix-only mode; the 3.5 documentation is only updated when a new security release is made and general doc changes to it are no

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman
New submission from caveman : if you execute the code below, mutually exclusive agrs are separated by '|' as expected. but if you uncomment the 1 line down there, then the args list will be too long, and as argparse tries to wrap the args around, it drops all '|'s

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___

Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Mikhail V
Bill wrote: > Mikhail V wrote: > > Python? Superior syntax for sure > > I believe that. What accounts for the popularity of PHP then? I can't tell for PHP for sure... As in many cases in software world, there is a principle of "who was the first there to solve some task". Probably also it was

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread bartc
On 11/10/2017 21:52, breamore...@gmail.com wrote: >> More importantly is the fact that due to your magnificent performance recently you have been promoted to be the General Manager of my Dream Team. Thanks, I guess. You can of course cement your place when you explain how, in your

[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Matthew Barnett
Matthew Barnett added the comment: You shouldn't assume that just because it takes a long time on one implementation that it'll take a long time on all of the others, because it's sometimes possible to include additional checks to reduce the problem. (I doubt you

[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-11 Thread Igor Skochinsky
New submission from Igor Skochinsky : Trying to install 3.6.3 on Windows 10 and getting this error. Repro steps: 1. Download python-3.6.3.exe or python-3.6.3-amd64.exe, run it 2. Select "Customize Installation" 3. Next 4. In Advanced Options, select [x] Install for all

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread breamoreboy
On Wednesday, October 11, 2017 at 4:47:43 PM UTC+1, bartc wrote: > On 11/10/2017 15:52, wrote: > > On Wednesday, October 11, 2017 at 3:14:51 PM UTC+1, bartc wrote: > >> On 11/10/2017 14:16, Marko Rauhamaa wrote: > >> > >>> Python and C don't try to protect you. In return, you get syntactic > >>>

[issue31766] Python 3.5 missing from documentation

2017-10-11 Thread Anthony Flury
New submission from Anthony Flury : In the Python version pull down list on docs.python.org, Python3.5 used to be listed, but has now been removed; the list only contains 2.7, 3.6 & 3.7. Python 3.5 is still the official Python 3.5 release in the Ubuntu repository,

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:42 AM, Ben Bacarisse wrote: > Bill writes: > >> Mikhail V wrote: >> [...] I'm not here to "cast stones", I like Python. I just think >> that you shouldn't cast stones at C/C++. > Not while PHP exists. There

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Ben Bacarisse
Bill writes: > Mikhail V wrote: > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... >>> PHP seems (seemed?) popular for laying

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:07 AM, Bill wrote: > Mikhail V wrote: > > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world...

[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Jason Stelzer
Jason Stelzer added the comment: I often speak in generalizations and half thoughts. Feel free to cherry pick as much or a little as you want. Including a core shim of whatever is agreed to be the minimalist functionality with a SEE ALSO note or clue as to where to

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Grant Edwards
On 2017-10-11, Bill wrote: > Mikhail V wrote: > [...] I'm not here to "cast stones", I like Python. I just think > that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... >>> PHP seems (seemed?) popular

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Bill
Grant Edwards wrote: On 2017-10-11, Bill wrote: Grant Edwards wrote: On 2017-10-11, Bill wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There

[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Rich
Rich added the comment: I think bitmath would be overkill to include in its entirety, but maybe there solution is a good one. There is also: https://pypi.python.org/pypi/byteformat/ https://pypi.python.org/pypi/datasize https://pypi.python.org/pypi/hurry.filesize

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Bill
Mikhail V wrote: [...] I'm not here to "cast stones", I like Python. I just think that you shouldn't cast stones at C/C++. Not while PHP exists. There aren't enough stones in the world... PHP seems (seemed?) popular for laying out web pages. Are their vastly superior options? Python?

[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Jason Stelzer
Jason Stelzer added the comment: Just pointing out that this exists and seems active. https://github.com/tbielawa/bitmath Perhaps include some or all of it in core python? Crazier things have happened. -- nosy: +Jason Stelzer

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread bartc
On 11/10/2017 20:30, Chris Angelico wrote: On Thu, Oct 12, 2017 at 3:29 AM, Rhodri James wrote: On 11/10/17 15:36, Chris Angelico wrote: That's only really one level more complex than declarations I use fairly regularly (I am an embedded system programmer most of the

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread bartc
On 11/10/2017 19:30, Chris Angelico wrote: On Thu, Oct 12, 2017 at 5:22 AM, Grant Edwards The easiest way to make stuff like that readable is to unroll them into a sequence of typedefs. But, a lot of people never really learn how to do that... The most complexity you'll usually see is a

[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Raphaël Riel
Raphaël Riel added the comment: Thanks Tim! Pretty nice answer that I can learn from! Thanks for your time. I definitely knew my Regex was broken, yet I was surprised the interpreter/library didn't gave up/error after some(several million) steps. Some other language

[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman
Change by Oren Milman : -- keywords: +patch pull_requests: +3934 stage: -> patch review ___ Python tracker ___

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread Zekun Li
Zekun Li added the comment: > This is only useful if the parent process has a lot of memory that's never > used by the child processes right? Otherwise, you would lose via refcounting > COWs. What we saw in prod is that memory fragmentation caused by gc is the main

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 3:29 AM, Rhodri James wrote: > On 11/10/17 15:36, Chris Angelico wrote: >> >> On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: >>> >>> Python, maybe. C syntax isn't as painful as C++ but I still have a lot of >>> trouble with it. (Eg.

[issue31765] BUG: System deadlocks performing big loop operations in python 3.5.4, windows 10

2017-10-11 Thread R. David Murray
R. David Murray added the comment: Most likely an error in your program logic, I'm afraid. This isn't a forum for getting help, you should try the python-list mailing list. (If you do find a bug, you can then open an issue with details.) -- nosy:

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread bartc
On 11/10/2017 17:16, Jonathan Cast wrote: On Wed, 2017-10-11 at 15:14 +0100, bartc wrote: On 11/10/2017 14:16, Marko Rauhamaa wrote: Python and C don't try to protect you. In return, you get syntactic convenience that probably enhances the quality of your programs. Python, maybe. C syntax

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson
Mark Dickinson added the comment: I agree it would be good to be consistent. -- ___ Python tracker ___

[issue31765] BUG: System deadlocks performing big loop operations in python 3.5.4, windows 10

2017-10-11 Thread Nikhil
New submission from Nikhil : What I did 1) root file declared where operation will start and import hashlib for getting hash signatures 2) os.walk for recursively diving into directory tree 3) open file and find sha256 digest and print it 4) close the file 5) recursively

[issue30767] logging must check exc_info correctly

2017-10-11 Thread Matthew Patton
Change by Matthew Patton : -- nosy: +mp5023 ___ Python tracker ___ ___ Python-bugs-list

[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman
New submission from Oren Milman : The following code causes a crash: import sqlite3 cursor = sqlite3.Cursor.__new__(sqlite3.Cursor) cursor.close() this is because pysqlite_cursor_close() (in Modules/_sqlite/cursor.c) assumes that `self->connection` is not NULL, and passes it

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Rhodri James
On 11/10/17 15:36, Chris Angelico wrote: On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: Python, maybe. C syntax isn't as painful as C++ but I still have a lot of trouble with it. (Eg. the variable declaration 'char(*(*x[3])())[5]'. The name of the variable can be found lurking

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 5:35 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Thu, Oct 12, 2017 at 2:43 AM, Marko Rauhamaa wrote: >>> That is not immediately all that significant but points to subtle >>> incompatibilities between the data

[issue30767] logging must check exc_info correctly

2017-10-11 Thread Matthew Patton
Change by Matthew Patton : -- versions: +Python 3.7 ___ Python tracker ___ ___

[issue31763] Add NOTICE level to the logging module

2017-10-11 Thread Matthew Patton
Change by Matthew Patton : -- keywords: +patch pull_requests: +3932 stage: -> patch review ___ Python tracker ___

[issue31763] Add NOTICE level to the logging module

2017-10-11 Thread R. David Murray
R. David Murray added the comment: I fixed the title for you, otherwise this looks like a duplicate of issue 31732. -- nosy: +r.david.murray title: Add TRACE level to the logging module -> Add NOTICE level to the logging module

[issue31762] Issue in login

2017-10-11 Thread R. David Murray
R. David Murray added the comment: This tracker is for reporting bugs in python. If you want to report a problem with the tracker, please use the 'report tracker problem' link in the left column. (That said, I thought the error message you show in the screenshot was

[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Tim Peters
Tim Peters added the comment: Well, the problem in the regexp is this part: "\d+,? ?". You're not _requiring_ that strings of digits be separated by a comma or blank, you're only _allowing_ them to be so separated. A solid string of digits is matched by this, and so the

[issue31763] Add TRACE level to the logging module

2017-10-11 Thread Matthew Patton
New submission from Matthew Patton : This was inspired by 31732. The logging module has 5 log levels: CRITICAL, ERROR, WARNING, INFO, DEBUG per https://docs.python.org/dev/library/logging.html#logging-levels However syslog(3) has for decades defined NOTICE and I can't think

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 12, 2017 at 2:43 AM, Marko Rauhamaa wrote: >> That is not immediately all that significant but points to subtle >> incompatibilities between the data models of C and C++. > > Indeed - their handling of empty structs is different.

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Chris Angelico
On Thu, Oct 12, 2017 at 5:22 AM, Grant Edwards wrote: > On 2017-10-11, bartc wrote: >> On 11/10/2017 15:36, Chris Angelico wrote: >>> On Thu, Oct 12, 2017 at 1:14 AM, bartc wrote: Python, maybe. C syntax isn't as painful as C++

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Grant Edwards
On 2017-10-11, Bill wrote: > Grant Edwards wrote: >> On 2017-10-11, Bill wrote: >> >> >>> [...] I'm not here to "cast stones", I like Python. I just think >>> that you shouldn't cast stones at C/C++. >> Not while PHP exists. There aren't

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Jonathan Cast
On Wed, 2017-10-11 at 15:14 +0100, bartc wrote: > On 11/10/2017 14:16, Marko Rauhamaa wrote: > > Python and C don't try to protect you. In return, you get syntactic > > convenience that probably enhances the quality of your programs. > > Python, maybe. C syntax isn't as painful as C++ but I still

  1   2   3   >