Re: Why not allow empty code blocks?

2016-07-30 Thread Paul Rubin
Steven D'Aprano writes: >> Maybe. Lisp and Scheme are great languages to teach the theory.. > Doesn't sound like a good teaching language to me.> > Meta-reasoning is harder than regular reasoning. That's why metaclasses are > harder to use than ordinary classes. Python

Re: Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread Random832
On Sun, Jul 31, 2016, at 00:01, D'Arcy J.M. Cain wrote: > On Sun, 31 Jul 2016 13:32:16 +1000 > Steven D'Aprano wrote: > > Many beginners make the mistake of writing: > > > > mylist = mylist.sort() > > > > or try to write: > > > > mylist.sort().reverse() > > > > If we had

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 1:51 PM, Random832 wrote: > On Sat, Jul 30, 2016, at 22:17, Chris Angelico wrote: >> Yeah. The distinction means you have a fundamental API difference >> between the procedures (which don't return anything) and the functions >> (whose return values

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 1:34 PM, Rustom Mody wrote: > to >> > teach the actual theory of programming languages (lambda calculus, lists >> > as a foundation unit for all other data structures), Scheme was an ideal >> > choice for teaching these fundamentals. >> >> People

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 1:12 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> I mean, "for i in 3.5" should start half way down the loop body, complete >> that loop, and >> then do three complete loops. > > > +1, this is the best idea for a "loop-and-a-half" >

Re: Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 1:32 PM, Steven D'Aprano wrote: >> It means you can't >> upgrade something from "always returns None" to "returns the number of >> objects frobbed" without breaking compat. > > You shouldn't ever need to. At least that's the theory. In practice its not

Re: Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread D'Arcy J.M. Cain
On Sun, 31 Jul 2016 13:32:16 +1000 Steven D'Aprano wrote: > Many beginners make the mistake of writing: > > mylist = mylist.sort() > > or try to write: > > mylist.sort().reverse() > > If we had procedures, that would be an obvious error (possibly even a > compile-time

Re: Why not allow empty code blocks?

2016-07-30 Thread Random832
On Sat, Jul 30, 2016, at 22:17, Chris Angelico wrote: > Yeah. The distinction means you have a fundamental API difference > between the procedures (which don't return anything) and the functions > (whose return values you mightn't care about). Not really any more than between functions returning

Re: Why not allow empty code blocks?

2016-07-30 Thread Random832
On Sat, Jul 30, 2016, at 22:10, Steven D'Aprano wrote: > "while True" doesn't merely emulate an infinite loop, it implements an > infinite loop without needing dedicated syntax, byte-code or > implementation. Er, it's not like it would need dedicated byte code anyway. The bytecode of an infinite

[issue13651] Improve redirection in urllib

2016-07-30 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [urllib.request.HTTPRedirectHandler.http_error_302] Relative Redirect issue ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 8:44:13 AM UTC+5:30, Steven D'Aprano wrote: > It has always perplexed me that Lisp's prefix notation is held up as > the /sine qua non/ of elegance and power, while Forth is ignored if not > ridiculed. Forth is just as expressive as Lisp, just as meta, just as >

Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 12:17 pm, Chris Angelico wrote: > Yeah. The distinction means you have a fundamental API difference > between the procedures (which don't return anything) and the functions > (whose return values you mightn't care about). Correct. > It means you can't > upgrade something

Re: Float

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:21:44 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 9:44 PM, Cai Gengyang wrote: > > You mentioned that : A floating point number[2] is number that is not an > > integer (and not a > > complex number) > > > > Hence , > > > > 10 is not a floating

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 04:16 am, Michael Torrie wrote: > On 07/30/2016 11:53 AM, Steven D'Aprano wrote: >> On Sun, 31 Jul 2016 02:29 am, Rustom Mody wrote: >> >>> MIT on practical reasons for python over scheme: >>> >> https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python

Re: Why not allow empty code blocks?

2016-07-30 Thread Gregory Ewing
Steven D'Aprano wrote: In English, we can talk about having a quick meal of fast food, but not a fast meal of quick food. If you interpret "quick" in its original sense of "alive" then it's theoretically possible, although not practised much in civilised society these days. Yoghurt might

Re: Why not allow empty code blocks?

2016-07-30 Thread Gregory Ewing
Chris Angelico wrote: I mean, "for i in 3.5" should start half way down the loop body, complete that loop, and then do three complete loops. +1, this is the best idea for a "loop-and-a-half" construct I've ever seen. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2016-07-30 Thread Martin Panter
Martin Panter added the comment: My view is that because the schemes are not in the documented list of supported schemes, this is a new feature, and any documentation update should include a “versionadded” or similar notice. -- components: +Library (Lib) stage: -> patch review

[issue27366] PEP487: Simpler customization of class creation

2016-07-30 Thread Nick Coghlan
Nick Coghlan added the comment: The new porting note doesn't quite capture all the subtleties of the situation, but should be sufficient for folks to get any affected custom metaclasses working again (since the key is to avoid passing those parameters up to type.__new__). I also added a note

[issue27366] PEP487: Simpler customization of class creation

2016-07-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 313e8fdb0d0c by Nick Coghlan in branch 'default': Issue 27366: PEP 487 docs updates https://hg.python.org/cpython/rev/313e8fdb0d0c -- ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 7:07:45 AM UTC+5:30, Gregory Ewing wrote: > Michael Torrie wrote: > > Python would have been alright to teach "programming," but to > > teach the actual theory of programming languages (lambda calculus, lists > > as a foundation unit for all other data structures) > >

[issue27657] urlparse fails if the path is numeric

2016-07-30 Thread Martin Panter
Martin Panter added the comment: The main backward compatibility consideration would be Issue 754016, but don’t agree with the changes made, and would support reverting them. The original bug reporter wanted urlparse("1.2.3.4:80", "http") to be treated as the URL http://1.2.3.4:80, but the IP

[issue27366] PEP487: Simpler customization of class creation

2016-07-30 Thread Nick Coghlan
Nick Coghlan added the comment: D'oh, another good catch Emanuel - and I'm even the one that raised the need to mention that in the Porting notes during the python-dev discussion :P I'll post an update to the What's New shortly. -- stage: resolved -> needs patch

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 11:45 AM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> So do I need to be able to "call a function as if it >> were a procedure", or is there a stark difference between the two >> types of callable? > > > Well, Pascal makes a stark

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 04:46 am, BartC wrote: > On 30/07/2016 16:48, Steven D'Aprano wrote: >> On Sat, 30 Jul 2016 11:58 pm, BartC wrote: >> >>> The 'i' is superfluous. Why not: >>> >>> for 10: >> >> Why bother? What's so special about this that it needs dedicated syntax? > > No named loop

Re: Why not allow empty code blocks?

2016-07-30 Thread Gregory Ewing
Chris Angelico wrote: So do I need to be able to "call a function as if it were a procedure", or is there a stark difference between the two types of callable? Well, Pascal makes a stark distinction between them -- it's a compile-time error to call a procedure as though it were a function or

Re: Why not allow empty code blocks?

2016-07-30 Thread Gregory Ewing
Michael Torrie wrote: Python would have been alright to teach "programming," but to teach the actual theory of programming languages (lambda calculus, lists as a foundation unit for all other data structures) I wouldn't say that "lists as a foundation unit for all other data structures" is (or

[issue27366] PEP487: Simpler customization of class creation

2016-07-30 Thread Emanuel Barry
Emanuel Barry added the comment: Hello Martin, and thank you for your patch! However, this patch removed the ability to pass keyword arguments to `type`, and it's not documented anywhere. I believe it should be documented at least in e.g. the "Changes in the Python API" of the What's New in

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
Mario Grgic added the comment: OK, after installing OpenSSL in /usr/local/ssl and even after copying libssl.pc, libcrypt.pc and openssl.pc over to /usr/local/lib/pkgconfig (which is where my pkg-config is looking or *.pc files) the configure script is still not finding the correct libcrypto.

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Ned Deily
Ned Deily added the comment: libcrypto is part of OpenSSL which is famous for not maintaining ABI compatibility across versions and generally you should be using the most recent version of OpenSSL. Depending what and where you have your copy installed, it's also possible the build picked up

[issue23150] urllib parse incorrect handing of params

2016-07-30 Thread Martin Panter
Martin Panter added the comment: If the problem was just Julian not being aware of urlsplit(), there is not much to be done for this bug. -- resolution: -> not a bug status: open -> pending ___ Python tracker

[issue22891] code removal from urllib.parse.urlsplit()

2016-07-30 Thread Martin Panter
Martin Panter added the comment: Issue 27657 has been opened about the quirk with numeric URLs -- dependencies: +urlparse fails if the path is numeric ___ Python tracker

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
Mario Grgic added the comment: It looks like it is picking up libcrypto.1.0.0.dylib from /usr/local/lib which I installed there as dependency for other binaries. Is there a minimal version of libcrypto that Python 3.5.2 needs? -- ___ Python

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Ned Deily
Ned Deily added the comment: The crash is in libcrypto but Apple doesn't supply a libcrypto.1.0.0 with OS X 10.11, only 0.9.7 and 0.9.8. Check the rest of the crash log to see where you're picking it up from and make sure you have an up-to-date version. If you have a version from MacPorts

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list

[issue27658] python 3.5.2 built from source fails to install completely on Mac OS X 10.11.6. Crashes subsequently.

2016-07-30 Thread Mario Grgic
New submission from Mario Grgic: I am on Mac OS X 10.11.6 trying to build and install Python 3.5.2 from source. I only have system Python 2.7.10 , and no other instances of Python 3.x. I configure the build as follows: ./configure --prefix=/Volumes/ramdisk/python3.5.2 The code is built

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: Heh, that comment about Berker came out wrong. I meant, he seems willing to do, and make time for, the small doc commits that some of the rest of us don't seem to get around to, which is great. -- ___ Python

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: Oh, don't say never. Berker seems to like these kind of small commits, and it won't get lost. Who knows, I may even decide to tackle it. Or someone else will decide to do the research and update your patch. --

[issue27604] More details about `-O` flag

2016-07-30 Thread Ram Rachum
Ram Rachum added the comment: Well, I guess we had a fun week exchanging a couple thousand words about a two-line change to the docs that's now never going to happen ;) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: I wouldn't object, but if I started to do it I'd wind up doing the research to "do it right" instead, so it would have to be someone else doing the intermediate commit :) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread Ram Rachum
Ram Rachum added the comment: Hmm. What do you think about merging 3.patch now, and then possibly adding more information later? (Or asking the people who are designing the complex behvior you describe to write those docs.) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: You know, it's actually more complicated than this now. We recently changed the way optimization levels are handled in pyc files in such a way that it is possible for other optimization 'levels" to be added by third parties. So the reference information is

usage of functools.partial in in parallelism

2016-07-30 Thread Sivan Greenberg
Hi all, I'm wondering about the use of partial in writing parallel code. Is is it quicker than re-evaluating arguments for a multiple session.get()'s method with different , for example (of requests) ? Or maybe it is used to make sure the arguments differ per each invocation ? (the parallel

[issue27657] urlparse fails if the path is numeric

2016-07-30 Thread R. David Murray
R. David Murray added the comment: See issue 14072. It may be time to look at this again, but we may still be constrained by backward compatibility. -- nosy: +r.david.murray ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 17:15, Rustom Mody wrote: On Saturday, July 30, 2016 at 8:17:19 PM UTC+5:30, Steven D'Aprano wrote: On Sat, 30 Jul 2016 09:39 pm, Rustom Mody wrote: On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: Anyway,

[issue27657] urlparse fails if the path is numeric

2016-07-30 Thread Björn Lindqvist
New submission from Björn Lindqvist: This affects both Python 2 and 3. This is as expected: >>> urlparse('abc:123.html') ParseResult(scheme='abc', netloc='', path='123.html', params='', query='', fragment='') >>> urlparse('123.html:abc') ParseResult(scheme='123.html', netloc='', path='abc',

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-30 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> wont fix stage: -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 16:48, Steven D'Aprano wrote: On Sat, 30 Jul 2016 11:58 pm, BartC wrote: The 'i' is superfluous. Why not: for 10: Why bother? What's so special about this that it needs dedicated syntax? No named loop variable to invent, create, maintain, and destroy. No range object to

[issue19837] Wire protocol encoding for the JSON module

2016-07-30 Thread Марк Коренберг
Марк Коренберг added the comment: In real life, I can confirm, that porting from Python2 to Python3 is almost automatic except JSON-related fixes. -- ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 18:11, D'Arcy J.M. Cain wrote: Maybe you should just change it to I_Am_a_Troll@nowhere. It's becoming increasingly obvious that you have absolutely no interest in Python and are just trying to get a rise out of people. Calm down. I enjoy programming language design and

Re: Float

2016-07-30 Thread eryk sun
On Sat, Jul 30, 2016 at 4:03 PM, Dennis Lee Bieber wrote: > And in a rather convoluted route, one can get to the underlying > representation... > import struct f = struct.pack(">f", 3.0) i = struct.pack(">i", 3) fi = struct.unpack(">i", f)

Re: Why not allow empty code blocks?

2016-07-30 Thread Michael Torrie
On 07/30/2016 11:53 AM, Steven D'Aprano wrote: > On Sun, 31 Jul 2016 02:29 am, Rustom Mody wrote: > >> MIT on practical reasons for python over scheme: >> > https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python >> Berkeley on fundamental reasons for the opposite choice:

[issue19837] Wire protocol encoding for the JSON module

2016-07-30 Thread Марк Коренберг
Марк Коренберг added the comment: One of the problem, that decodeing JSON is FSM, where input is one symbol rather than one byte. AFAIK, Python still does not have FSM for decoding UTF-8 sequence, so iterative decoding of JSON will require more changes than expected. -- nosy: +mmarkk

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 02:29 am, Rustom Mody wrote: > MIT on practical reasons for python over scheme: > https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python > Berkeley on fundamental reasons for the opposite choice: > https://people.eecs.berkeley.edu/~bh/proglang.html

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 10:45:23 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 31, 2016 at 2:58 AM, Rustom Mody wrote: > >> Where, in any useful production code, is the difference between > >> functions and procedures actually helpful? Or where, in student code, > >> would it be useful to

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 2:58 AM, Rustom Mody wrote: >> Where, in any useful production code, is the difference between >> functions and procedures actually helpful? Or where, in student code, >> would it be useful to distinguish? I've been teaching Python to >> students

Re: Why not allow empty code blocks?

2016-07-30 Thread D'Arcy J.M. Cain
On Sat, 30 Jul 2016 16:14:18 +0100 BartC wrote: > > By the way, the last time I replied to you it went to the list but > > your address bounced. Was that a glitch or are you using an > > invalid address in a mailing list? > > Do you mean my email address? That was valid once

[issue24672] shutil.rmtree fails on non ascii filenames

2016-07-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: I agree. I was able to apply a fairly simple fix to setuptools to address the failure (https://github.com/pypa/setuptools/commit/857949575022946cc60c7cd1d0d088246d3f7540). I suggest closing this ticket as won't fix. --

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 10:07:59 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 31, 2016 at 2:15 AM, Rustom Mody wrote: > > Diff between > > print "x" > > and > > print("x") > > is one char — the closing ‘)’ > > > > To make a dispute about that — I’ll leave to BartC! > > > > The more

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 12:47 am, Steven D'Aprano wrote: > On Sat, 30 Jul 2016 09:39 pm, Rustom Mody wrote: [...] >> - Prior Art: Its builtin and special in Fortran, Pascal, Basic > > Possibly Fortran. But which version of Fortran? Do we really want to take > decisions made in 1953 for the first

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 2:15 AM, Rustom Mody wrote: > Diff between > print "x" > and > print("x") > is one char — the closing ‘)’ > > To make a dispute about that — I’ll leave to BartC! > > The more general baby that is significant is that beginners should have > it easy to

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sun, Jul 31, 2016 at 1:48 AM, Steven D'Aprano wrote: > Hypertalk (and related XTalk languages) offer a number of dedicated looping > constructs. Using square brackets [] for optional terms: > > repeat [forever] > repeat [for] number [times] > repeat until condition >

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 9:45:34 PM UTC+5:30, Rustom Mody wrote: > Ok Python is better than Java is better than C++ > But it cannot stand up to scheme as a teaching language > [The MIT Profs who replaced scheme by python admit to as much viz. Send pressed prematurely — Sorry MIT on

Re: JSON result parsing

2016-07-30 Thread Ben Bacarisse
TUA writes: > Calls to my REST api may either return a dict (for single results) or > a list of dicts (for multiple results). I think John's answer missed this part. > I receive these results using the requests library. > > I want to retrieve the value for a key 'ID' but

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 8:17:19 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 30 Jul 2016 09:39 pm, Rustom Mody wrote: > > > On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: > >> On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: > >> > Anyway, if you're going to talk

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 11:06 pm, Steven D'Aprano wrote: > If it a sign of a poor programmer that > ignores the common idioms of a language and writes in another > language's "grammar". /face-palm "If it a sign..." Of course that was not intentional. What's the law that says that any post

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sun, 31 Jul 2016 12:16 am, BartC wrote: > On 30/07/2016 14:06, Steven D'Aprano wrote: > >> End of story. As far as I am concerned, the 97% of languages which allow >> the visual structure of the code to differ from their logical structure >> are BAD LANGUAGES. > > You mean languages that

[issue22724] byte-compile fails for cross-builds

2016-07-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch rebased to current tip. To summarize: * The root cause of the problem reported by Benedikt still exists. * The problem is hidden now that the shared libraries names include the PLATFORM_TRIPLET. * But byte-compilation still fails for cross-builds when

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 11:58 pm, BartC wrote: > The 'i' is superfluous. Why not: > > for 10: Why bother? What's so special about this that it needs dedicated syntax? Hypertalk (and related XTalk languages) offer a number of dedicated looping constructs. Using square brackets [] for optional

[issue27656] [Patch] Make presence of SCHED_* optional

2016-07-30 Thread Ed Schouten
New submission from Ed Schouten: The SCHED_* constants that are part of POSIX's are all optional: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html Python already declares the SCHED_SPORADIC constant as part of the POSIX module optionally, depending on whether it is

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset eed3a5b9239f by Alexander Belopolsky in branch 'default': Issue 24773: Use the standard Asia/Tehran name in the Iran test. https://hg.python.org/cpython/rev/eed3a5b9239f -- ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I don't know to what extent these links are considered standard (koobs) The links like Iran are non-standard. they are specified in the "backward" file in the IANA tzdata distribution which has the following preamble: # This file provides links

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 15:39, D'Arcy J.M. Cain wrote: By the way, the last time I replied to you it went to the list but your address bounced. Was that a glitch or are you using an invalid address in a mailing list? Do you mean my email address? That was valid once but no longer. (If you want to

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 10:31 pm, Rustom Mody wrote: > What makes you think I wanted to print those numbers?? The fact that you called print. > Maybe I wanted a list of 10 None-s?? The idiomatic Python way of doing it would be: [None]*10 The beginner's way of doing it would be: [None, None,

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

2016-07-30 Thread koobs
Changes by koobs : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list

[issue27576] An unexpected difference between dict and OrderedDict

2016-07-30 Thread Xiang Zhang
Xiang Zhang added the comment: After totally studying OrderedDict, I get a better understanding of what Serhiy means. So although we can get a better performance for dict, it's not needed at all. Remove the v3 patch. -- ___ Python tracker

[issue27576] An unexpected difference between dict and OrderedDict

2016-07-30 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43902/odict_update_v3.patch ___ Python tracker ___

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

2016-07-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: It is also broken for gcc, see the buildbot 'compile' output. It seems broken for all non windows builds whatever the compiler. -- ___ Python tracker

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

2016-07-30 Thread Ned Deily
Ned Deily added the comment: It's not just broken for cross-compiling. As I noted earlier, it's broken when using other than gcc, such as is the case with current OS X systems. This needs to be fixed before release. -- ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 10:27 pm, BartC wrote: > This is one thing I can never get right in Python: controlling when a > newline is or isn't generated and what happens with separators. In Python 3, that's easy: the default space separator and newline at the end can both be customized to any string

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

2016-07-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: The reason I would like this problem fixed is that the test suite is run on an installed Python when cross-compiling, obviously you cannot run the test suite with the cross-compiled Python on the source tree of the build system. --

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 09:39 pm, Rustom Mody wrote: > On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: >> On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: >> > Anyway, if you're going to talk about annoying things forced upon you >> > by the language, what about: >> > >> > "()"

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

2016-07-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: This problem occured for the first time on the "installed Python" buildbot (setup by Zachary) at http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/747 on the day changeset 78d2cb7f66b6 has been commited (see msg268528).

Re: Why not allow empty code blocks?

2016-07-30 Thread D'Arcy J.M. Cain
On Sat, 30 Jul 2016 11:15:12 +0100 BartC wrote: >> Doesn't it look like there's something missing in the Python? Both > the 'fi' or 'end', and the possibility of an 'h' statement. > > Note the Algol68-style style is more free-format where indents are > not significant. > >

[issue27655] [Patch] Don't require presence of POLLPRI

2016-07-30 Thread Ed Schouten
New submission from Ed Schouten: RFC 6093 states that applications "SHOULD NOT" make use of TCP's out-of-band data. For this reason, CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html) does not provide support for it. This means that its poll() function does provide

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 14:06, Steven D'Aprano wrote: End of story. As far as I am concerned, the 97% of languages which allow the visual structure of the code to differ from their logical structure are BAD LANGUAGES. You mean languages that allow code like this: a = ( b +c * d) ?

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 14:36, Chris Angelico wrote: On Sat, Jul 30, 2016 at 11:06 PM, Steven D'Aprano wrote: "for i in range(N):" just to repeat a block N times... Why should there be special syntax just for repeating a block N times? There's a general purpose for-loop which

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 11:06 PM, Steven D'Aprano wrote: >> "for i in range(N):" just to repeat a block N times... > > Why should there be special syntax just for repeating a block N times? > There's a general purpose for-loop which performs iteration. Why do you > need

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

2016-07-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: For 3.3, 3.4 it seems reasonable to backport changes from issue26804 and then apply this patch. I will do this today. -- assignee: -> orsenthil ___ Python tracker

Re: Why not allow empty code blocks?

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 08:15 pm, BartC wrote: > Interesting use of 'pass' in this example: > > http://pastebin.com/aYJdgEL4 > > (I do believe he's using 'pass' as 'end'! Although he misses some out in > that case.) I wouldn't call it so much "interesting" as "a good example of how not to

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 10:47 PM, Chris Angelico wrote: > So, no improvement - exactly equal. And no longer a single expression, > ergo no longer valid in as many contexts. (Also, it requires the use > and damage of some iterator variable, which may be significant in some >

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 10:39 PM, BartC wrote: > On 30/07/2016 13:22, Chris Angelico wrote: > > print(*range(10), sep='\n') >> >> 0 >> 1 >> 2 >> 3 >> 4 >> 5 >> 6 >> 7 >> 8 >> 9 > > >> >> Beat that, print statement. > > > for i in range(10): print i > > Same number of

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 10:31 PM, Rustom Mody wrote: > What makes you think I wanted to print those numbers?? > Maybe I wanted a list of 10 None-s?? Because you NEVER SAID what you wanted! How can you talk about error detection if you won't say what the programmer's

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 13:22, Chris Angelico wrote: print(*range(10), sep='\n') 0 1 2 3 4 5 6 7 8 9 Beat that, print statement. for i in range(10): print i Same number of characters, but a lot less punctuation! -- Bartc -- https://mail.python.org/mailman/listinfo/python-list

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

2016-07-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: The patch looks good to me. I am checking this in. -- ___ Python tracker ___

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:53:12 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 10:11 PM, Rustom Mody wrote: > >> > - Poorer error catching: What was a straight syntax error is now a > >> > lint-catch (at best) > >> > [print (x) for x in range(20)] > >> > >> Huh? Aside from

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 10:27 PM, BartC wrote: >> where the print function allows full customization >> of both end= and sep=. > > > This is one thing I can never get right in Python: controlling when a > newline is or isn't generated and what happens with separators. > > (In

Re: Why not allow empty code blocks?

2016-07-30 Thread BartC
On 30/07/2016 12:49, Chris Angelico wrote: On Sat, Jul 30, 2016 at 9:39 PM, Rustom Mody wrote: Its a function… ok. Its ‘just’ a function… Arguable For example: - Prior Art: Its builtin and special in Fortran, Pascal, Basic And it's not built-in or special in C, or

ANN: Python 3 pyQt5 graphical curve and surface fitter

2016-07-30 Thread zunzun . com
I have created a Python 3 pyQt5 graphical curve and surface fitting application, the URL on GutHub is: https://github.com/zunzun/pyQt5Fit James -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation:

Re: Why not allow empty code blocks?

2016-07-30 Thread Chris Angelico
On Sat, Jul 30, 2016 at 10:11 PM, Rustom Mody wrote: >> > - Poorer error catching: What was a straight syntax error is now a >> > lint-catch (at best) >> > [print (x) for x in range(20)] >> >> Huh? Aside from the fact that you're constructing a useless list of >> Nones,

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:19:25 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 9:39 PM, Rustom Mody wrote: > > On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: > >> On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: > >> > Anyway, if you're going to talk

  1   2   >