Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Rustom Mody
On Sunday, March 27, 2016 at 10:32:34 AM UTC+5:30, Rustom Mody wrote: > I had an impression of seeing some discussion on this and resolved not > to incorporate. Meaning: I think I remember something about a resolution -- after some debate -- not to OO-ify the C/Unix errno system --

[issue26649] Fail update installation: 'utf-8' codec can't decode

2016-03-26 Thread q20611...@163.com
New submission from q20611...@163.com: This error occureed on the gns3 ; give you the errorlog files . -- files: gns3-errorlog messages: 262510 nosy: shanzhengcheng priority: normal severity: normal status: open title: Fail update installation: 'utf-8' codec can't decode versions:

Re: repeat items in a list

2016-03-26 Thread Paul Rubin
beliav...@aol.com writes: > yy = list(chain.from_iterable([list(repeat(aa,nrep)) for aa in xx])) The chain approach seems more natural to me: yy = list(chain.from_iterable(map(lambda x: [x,x], xx))) may make the doubling more obvious, and in Python 3 it should avoid the intermediate lists

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does FreeBSD grep support the `--help` option? Long options is GNU extension, classical UNIX commands supported only short options. -- ___ Python tracker

Re: Another Key Binding Question

2016-03-26 Thread Wildman via Python-list
On Sat, 26 Mar 2016 17:47:02 +, MRAB wrote: > On 2016-03-26 17:10, Wildman via Python-list wrote: >> I use some key bindings in my program. They are declared >> like this: >> >> root.bind("" + "q", quit) >> root.bind("" + "q", quit) >> root.bind("" + "Q", quit) >>

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Rustom Mody
On Sunday, March 27, 2016 at 2:15:22 AM UTC+5:30, Terry Reedy wrote: > On 3/26/2016 1:43 PM, Rustom Mody wrote: > > > There is this nice piece of OO called the exception hierarchy: > > > https://docs.python.org/2/library/exceptions.html#exception-hierarchy > >

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-26 Thread Eric Price
Eric Price added the comment: Well, I could piggyback on the existing flags if I just wanted to support readline -- there are already two flags for readline 4.0 -- but if our real goal is to be compatible with editline, we probably need another flag. I think you're right that it should

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-03-26 Thread Martin Panter
Martin Panter added the comment: Okay so for the record, the maintainence branches were changed over from svn.python.org to self-signed.pythontest.net, and just now I changed the 3.6 branch to use a local server for most tests. -- resolution: -> fixed stage: patch review -> resolved

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Chris Angelico
On Sun, Mar 27, 2016 at 3:05 PM, Gregory Ewing wrote: > Gene Heskett wrote: >> >> But I learned a lot about hot ($2400F) iron too. > > > 2400 dollars farenheit? That's an intriguing unit... > > Or is it meant to be the temperature in hex? Hex, obviously. Which is

[issue22854] Documentation/implementation out of sync for IO

2016-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker ___

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Gregory Ewing
Gene Heskett wrote: But I learned a lot about hot ($2400F) iron too. 2400 dollars farenheit? That's an intriguing unit... Or is it meant to be the temperature in hex? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: setup

2016-03-26 Thread eryk sun
On Sat, Mar 26, 2016 at 6:20 PM, Joel Goldstick wrote: > I'm guessing you are on windows and you could google the error code, but > also search the list because this question has been asked and answered I > believe A little knowledge helps. An upper word of 0x8007

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> martin.panter nosy: +serhiy.storchaka stage: patch review -> commit review ___ Python tracker

Re: Interpretation

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 03:33 am, Dennis Ngeno wrote: > My programs have never combile, they keep telling me , systax error even > after copy pasting Dennis, if Python is complaining that you have a SyntaxError, it means you have written something which the interpreter cannot understand. We cannot

Re: Interpretation

2016-03-26 Thread Steven D'Aprano
On Sun, 27 Mar 2016 02:22 pm, Mario R. Osorio wrote: > OTOH, python code is not supposed to be compiled. Technically, Python code is compiled, to byte-code rather than machine-code, but still compiled. That's what is inside the .pyc files you will often see after importing modules. And Python

Re: Interpretation

2016-03-26 Thread Ben Finney
"Mario R. Osorio" writes: > On Saturday, March 26, 2016 at 5:59:04 AM UTC-4, Dennis Ngeno wrote: > > My programs have never combile, they keep telling me , systax error even > > after copy pasting > > No pun intended, but I hope you are not typing your code like you > typed

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Steven D'Aprano
On Sun, 27 Mar 2016 10:30 am, John Pote wrote: > So intrigued by this question I tried the following > def fnc( n ): > print "fnc called with parameter '%d'" % n > return n > > for i in range(0,5): > if i%2 == 0: > fnc > next > print i > > and got the same

Re: Interpretation

2016-03-26 Thread Mario R. Osorio
On Saturday, March 26, 2016 at 5:59:04 AM UTC-4, Dennis Ngeno wrote: > My programs have never combile, they keep telling me , systax error even > after copy pasting No pun intended, but I hope you are not typing your code like you typed your message. OTOH, python code is not supposed to be

Re: Threading is foobared?

2016-03-26 Thread Ben Finney
Steven D'Aprano writes: > Am I the only one who has noticed that threading of posts here is > severely broken? It's always been the case that there have been a few > posts here and there that break threading, but now it seems to be much > more common. I can't give an

Threading is foobared?

2016-03-26 Thread Steven D'Aprano
Am I the only one who has noticed that threading of posts here is severely broken? It's always been the case that there have been a few posts here and there that break threading, but now it seems to be much more common. For instance, I see Jerry Martens' post "help with program". According to my

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Chris Angelico
On Sun, Mar 27, 2016 at 1:44 PM, Steven D'Aprano wrote: > If [anyone] takes over the world and bans C, insisting that it be > replaced with a new language of his own design called "T", the > *implementation* of CPython would have to change, but the *interface*, the > language

Re: help with program

2016-03-26 Thread Steven D'Aprano
On Sun, 27 Mar 2016 07:38 am, Jerry Martens wrote: > hi im trying to run this program and it opens a screen really ast and > closes it faster withou any results. Put this at the very end of your program: # Python 2 version raw_input('Press the Enter key to exit... ') # Python 3 version

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Steven D'Aprano
On Sun, 27 Mar 2016 04:43 am, Rustom Mody wrote: > On Saturday, March 26, 2016 at 4:09:41 PM UTC+5:30, Steven D'Aprano wrote: >> On Sat, 26 Mar 2016 04:30 pm, Rustom Mody wrote: >> >> > For one thing its good to remember that we wouldn't be here without >> > python Python wouldn't be what it is

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-03-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3da812602881 by Martin Panter in branch 'default': Issue #25940: Use internal local server more in test_ssl https://hg.python.org/cpython/rev/3da812602881 -- ___ Python tracker

[issue22854] Documentation/implementation out of sync for IO

2016-03-26 Thread Martin Panter
Martin Panter added the comment: Okay let’s document fileno(), read, write and seek operations in the base classes as raising OSError then. This effectively rejects the OP (Stanislaw’s) view that the exception should be more specific. In patch v3, I changed everything over to say OSError is

[issue26648] csv.reader Error message indicates to use deprecated

2016-03-26 Thread Philip Martin
New submission from Philip Martin: Currently, the error message: _csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode? is cryptic in that universal line mode has been deprecated, and will not run in Python 3.5., i.e.:

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread BartC
On 26/03/2016 23:30, John Pote wrote: So intrigued by this question I tried the following def fnc( n ): print "fnc called with parameter '%d'" % n return n for i in range(0,5): if i%2 == 0: fnc next print i and got the same result as the OP A couple of

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread John Pote
On 26/03/2016 12:05, Chris Angelico wrote: On Fri, Mar 25, 2016 at 11:06 PM, Aleksander Alekseev wrote: Recently I spend half an hour looking for a bug in code like this: eax@fujitsu:~/temp$ cat ./t.py #!/usr/bin/env python3 for x in range(0,5): if x % 2 == 0:

Re: repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 7:30:14 PM UTC-4, Mark Lawrence wrote: > On 26/03/2016 22:12, beliavsky--- via Python-list wrote: > > I can create a list that has repeated elements of another list as follows: > > > > xx = ["a","b"] > > nrep = 3 > > print xx > > yy = [] > > for aa in xx: > >

Re: repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 7:24:10 PM UTC-4, Erik wrote: > Hi, > > On 26/03/16 22:12, beliavsky--- via Python-list wrote: > > I can create a list that has repeated elements of another list as follows: > > > > xx = ["a","b"] > > nrep = 3 > > print xx > > yy = [] > > for aa in xx: > > for

Re: repeat items in a list

2016-03-26 Thread Mark Lawrence
On 26/03/2016 22:12, beliavsky--- via Python-list wrote: I can create a list that has repeated elements of another list as follows: xx = ["a","b"] nrep = 3 print xx yy = [] for aa in xx: for i in range(nrep): yy.append(aa) print yy output: ['a', 'b'] ['a', 'a', 'a', 'b', 'b',

[issue26647] Wordcode

2016-03-26 Thread Demur Rumed
New submission from Demur Rumed: Originally started @ https://github.com/abarnert/cpython/tree/wpy This patch is based off of https://github.com/serprex/cpython/tree/wpy It omits importlib.h & importlib_external.h as those are generated It omits

Re: repeat items in a list

2016-03-26 Thread Erik
Hi, On 26/03/16 22:12, beliavsky--- via Python-list wrote: I can create a list that has repeated elements of another list as follows: xx = ["a","b"] nrep = 3 print xx yy = [] for aa in xx: for i in range(nrep): yy.append(aa) print yy output: ['a', 'b'] ['a', 'a', 'a', 'b', 'b',

Re: setup

2016-03-26 Thread Joel Goldstick
On Sat, Mar 26, 2016 at 6:52 PM, Youssef Ghorab wrote: > dear python,i'm having a problem when i'm setting up the program > 0x80070570 problem > if you please could give me any advice will be cool. > thanks in advance > -- >

Re: repeat items in a list

2016-03-26 Thread Cameron Simpson
On 26Mar2016 15:12, beliav...@aol.com wrote: I can create a list that has repeated elements of another list as follows: xx = ["a","b"] nrep = 3 print xx yy = [] for aa in xx: for i in range(nrep): yy.append(aa) print yy output: ['a', 'b'] ['a', 'a', 'a', 'b', 'b',

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-26 Thread Martin Panter
Martin Panter added the comment: Thanks for the reviews. Here is a patch that avoids breaking read(-1, buffer). -- Added file: http://bugs.python.org/file42299/ssl-negative.v2.patch ___ Python tracker

Re: help with program

2016-03-26 Thread Mark Lawrence
On 26/03/2016 20:38, Jerry Martens wrote: any help would be appreciated! or could you please point me to a good forum for total noobs?thank you for your time and effort! https://mail.python.org/mailman/listinfo/tutor also available at gmane.comp.python.tutor. -- My fellow Pythonistas, ask

setup

2016-03-26 Thread Youssef Ghorab
dear python,i'm having a problem when i'm setting up the program 0x80070570 problem if you please could give me any advice will be cool. thanks in advance -- https://mail.python.org/mailman/listinfo/python-list

Re: Exclude every nth element from list?

2016-03-26 Thread Mark Lawrence
On 26/03/2016 22:08, beliavsky--- via Python-list wrote: On Saturday, March 26, 2016 at 1:02:06 PM UTC-4, Gary Herron wrote: On 03/26/2016 09:49 AM, beliavsky--- via Python-list wrote: I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes

Re: help with program

2016-03-26 Thread Chris Angelico
On Sun, Mar 27, 2016 at 7:38 AM, Jerry Martens wrote: > hi im trying to run this program and it opens a screen really ast and closes > it faster withou any results. im totally a noob. everything i google is > confusing. do i need to place this is in a folder or just run

help with program

2016-03-26 Thread Jerry Martens
hi im trying to run this program and it opens a screen really ast and closes it faster withou any results. im totally a noob. everything i google is confusing. do i need to place this is in a folder or just run from command line? i have the latest version of python. im running win 7. any help

repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
I can create a list that has repeated elements of another list as follows: xx = ["a","b"] nrep = 3 print xx yy = [] for aa in xx: for i in range(nrep): yy.append(aa) print yy output: ['a', 'b'] ['a', 'a', 'a', 'b', 'b', 'b'] Is there a one-liner to create a list with repeated

Re: Exclude every nth element from list?

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 1:02:06 PM UTC-4, Gary Herron wrote: > On 03/26/2016 09:49 AM, beliavsky--- via Python-list wrote: > > I can use x[::n] to select every nth element of a list. Is there a > > one-liner to get a list that excludes every nth element? > > Yes: > > >>>

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Cameron Simpson
On 26Mar2016 02:36, Thomas 'PointedEars' Lahn wrote: Ned Batchelder wrote: Chris, I apologize for Thomas. How dare you to speak for me, Because it is something you never say: sorry for my rudeness. and *again* the rest of the subscribers? He speaks for me at least,

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the explanation. Your patch lgtm. On Sat, Mar 26, 2016, at 15:01, Martin Panter wrote: > > Martin Panter added the comment: > > Socket objects aren’t exactly file-like. Plain non-SSL sockets don’t even > have read() methods. > > I think giving

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-26 Thread Martin Panter
Martin Panter added the comment: Socket objects aren’t exactly file-like. Plain non-SSL sockets don’t even have read() methods. I think giving a meaning to recv(-1) would be an (unwanted) new feature, rather than a bug fix. If you want a file-like object linked to a socket, I would suggest

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Chris Angelico
On Sun, Mar 27, 2016 at 4:43 AM, Rustom Mody wrote: > On Saturday, March 26, 2016 at 4:09:41 PM UTC+5:30, Steven D'Aprano wrote: >> On Sat, 26 Mar 2016 04:30 pm, Rustom Mody wrote: >> >> > For one thing its good to remember that we wouldn't be here without python >> >

[issue26644] SSLSocket.recv(-1) triggers SystemError

2016-03-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Is this what other file-like objects do with negatives sizes? -- nosy: +benjamin.peterson ___ Python tracker ___

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Terry Reedy
On 3/26/2016 1:43 PM, Rustom Mody wrote: There is this nice piece of OO called the exception hierarchy: > https://docs.python.org/2/library/exceptions.html#exception-hierarchy https://docs.python.org/3/library/exceptions.html#exception-hierarchy BaseException ⊇ Exception ⊇ EnvironmentError

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Alexey Muranov
Alexey Muranov added the comment: Thanks for the explanation, this makes sense. I did not notice that argparse outputs to stderr if command line arguments are wrong, i was probably wrong when said it prints error messages to stdout. I did not notice indeed that there were no `-h` option in

[issue26646] Allow built-in module in package

2016-03-26 Thread Daniel Shaulov
Changes by Daniel Shaulov : Added file: http://bugs.python.org/file42298/importlib_h.patch ___ Python tracker ___

[issue26646] Allow built-in module in package

2016-03-26 Thread Daniel Shaulov
New submission from Daniel Shaulov: Hi, I was trying to build a python interpreter that has the cpp part of msgpack as a built-in module. I thought that I could just copy the msgpack folder to the Modules folder and add this 2 lines to Modules/Setup.local: msgpack._packer msgpack/_packer.cpp

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-03-26 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Michael Torrie
On 03/26/2016 11:49 AM, Michael Torrie wrote: > Well said, Ned, and a good reminder for me, and I suspect all of us, to > considering how we communicate. It's our nature to think problems lie ^^ Sigh. Consider. And proof read. > with everyone else but us (as witnessed by recent

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 24/03/2016 20:53, c...@isbd.net wrote: >> I use Python wherever I can and find this list (as a usenet group via >> gmane) an invaluable help at times. >> >> Occasionally I have to make forays into Javascript, can anyone >> recommend a place similar to this list where

[issue22898] segfault during shutdown attempting to log ResourceWarning

2016-03-26 Thread Xavier de Gaye
Xavier de Gaye added the comment: Victor, With warn_5.patch *filename is not set when globals is NULL: setup_context() returns 0, and so do_warn() returns NULL without calling warn_explicit(). This is different from your initial warn.patch where setup_context() returns 1 in that case and an

Re: Exclude every nth element from list?

2016-03-26 Thread BartC
On 26/03/2016 16:49, beliav...@aol.com wrote: I can use x[::n] to select every nth element of a list. I would use x[n-1::n] if 'nth' means the 3rd element of [10,20,30,40,...] is 30. Otherwise every selection will include the first, no matter what n is. -- Bartc --

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Michael Torrie
On 03/26/2016 05:37 AM, Ned Batchelder wrote: > [...] > Has anyone ever said to you, "Thanks, Thomas! Lots of people were giving > me answers, but they were all so kind and polite about it, I couldn't > see what they were saying. Finally, your blunt direct manner got > through to me, so now I

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Rustom Mody
On Saturday, March 26, 2016 at 4:09:41 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 26 Mar 2016 04:30 pm, Rustom Mody wrote: > > > For one thing its good to remember that we wouldn't be here without python > > Python wouldn't be what it is without CPython > > There is nothing about Python that

Re: Another Key Binding Question

2016-03-26 Thread MRAB
On 2016-03-26 17:10, Wildman via Python-list wrote: I use some key bindings in my program. They are declared like this: root.bind("" + "q", quit) root.bind("" + "q", quit) root.bind("" + "Q", quit) root.bind("" + "Q", quit) The above binds both Alt keys

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-03-26 Thread Wolfgang Langner
Wolfgang Langner added the comment: Ok, I implemented point 3. Check if it is a dir or file and makepath only in this case. All other entries are added unmodified to the set. Added a test case also for an URL path. I think duplicate detection is now improved and it should break nothing.

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Joel Goldstick
On Sat, Mar 26, 2016 at 1:31 AM, Juan Dent wrote: > > I am trying to run ‘python cppdep.py’ but get the following: > > > > analyzing dependencies among all components ... > Traceback (most recent

Another Key Binding Question

2016-03-26 Thread Wildman via Python-list
I use some key bindings in my program. They are declared like this: root.bind("" + "q", quit) root.bind("" + "q", quit) root.bind("" + "Q", quit) root.bind("" + "Q", quit) The above binds both Alt keys with upper and lower case 'q'. Is there a way to combine the

Re: Exclude every nth element from list?

2016-03-26 Thread Vincent Vande Vyvre
Le 26/03/2016 18:06, Vincent Vande Vyvre a écrit : Le 26/03/2016 17:49, beliavsky--- via Python-list a écrit : I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? Something like that: >>> l = list("lkodjuyhrtgfedcvfg")

Re: Exclude every nth element from list?

2016-03-26 Thread Peter Otten
beliavsky--- via Python-list wrote: > I can use x[::n] to select every nth element of a list. Is there a > one-liner to get a list that excludes every nth element? del x[::n] ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: Exclude every nth element from list?

2016-03-26 Thread Vincent Vande Vyvre
Le 26/03/2016 17:49, beliavsky--- via Python-list a écrit : I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? Something like that: >>> l = list("lkodjuyhrtgfedcvfg") >>> l ['l', 'k', 'o', 'd', 'j', 'u', 'y', 'h', 'r',

Re: Exclude every nth element from list?

2016-03-26 Thread Erik
On 26/03/16 16:49, beliavsky--- via Python-list wrote: I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? (e for i, e in enumerate(x) if i % n) K. -- https://mail.python.org/mailman/listinfo/python-list

Re: Exclude every nth element from list?

2016-03-26 Thread Bob Gailer
On Mar 26, 2016 12:50 PM, "beliavsky--- via Python-list" < python-list@python.org> wrote: > > I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? [y for (i,y) in enumerate(x) if i % n] --

Re: Exclude every nth element from list?

2016-03-26 Thread Gary Herron
On 03/26/2016 09:49 AM, beliavsky--- via Python-list wrote: I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? Yes: >>> L=list(range(20)) >>> [x for i,x in enumerate(L) if i%3 != 0] [1, 2, 4, 5, 7, 8, 10, 11, 13,

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Gary Herron
On 03/25/2016 10:31 PM, Juan Dent wrote: I am trying to run ‘python cppdep.py’ but get the following: I would guess that this code was written some time ago for Python2, but that you have downloaded and run it with Python3. Try installing Python2 instead of Python3. Or try talking

Exclude every nth element from list?

2016-03-26 Thread beliavsky--- via Python-list
I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? -- https://mail.python.org/mailman/listinfo/python-list

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: `grep --help` outputs to stdout. `grep -h` outputs to stderr, because this is error, there is no the `-h` flag. The same for git and most other command line tools. argparse follows this behavior. There is no bug. -- nosy: +serhiy.storchaka

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Gene Heskett
On Saturday 26 March 2016 11:35:52 Larry Martell wrote: > On Sat, Mar 26, 2016 at 11:31 AM, Gene Heskett wrote: > > On Saturday 26 March 2016 07:52:05 Larry Martell wrote: > >> As my wife once said, "If you start with 'Listen, asshole, ...' > >> they probably won't hear what

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Larry Martell
On Sat, Mar 26, 2016 at 11:31 AM, Gene Heskett wrote: > On Saturday 26 March 2016 07:52:05 Larry Martell wrote: >> As my wife once said, "If you start with 'Listen, asshole, ...' they >> probably won't hear what you have to say after that. > > She is 100% correct, but try as I

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Gene Heskett
On Saturday 26 March 2016 07:52:05 Larry Martell wrote: > On Sat, Mar 26, 2016 at 7:37 AM, Ned Batchelder wrote: > > Thomas, you don't have to choose between correct and nice. It's > > possible to be both. > > "I'm not good, I'm not nice, I'm just right." > > That was

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread BartC
On 26/03/2016 14:30, Chris Angelico wrote: On Sun, Mar 27, 2016 at 1:09 AM, BartC wrote: I'm surprised that both C and Python allow statements that apparently do nothing. In both, an example is: x on a line by itself. This expression is evaluated, but then any result

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Mark Lawrence
On 24/03/2016 20:53, c...@isbd.net wrote: I use Python wherever I can and find this list (as a usenet group via gmane) an invaluable help at times. Occasionally I have to make forays into Javascript, can anyone recommend a place similar to this list where Javascript questions can be asked? The

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Chris Angelico
On Sun, Mar 27, 2016 at 1:09 AM, BartC wrote: > I'm surprised that both C and Python allow statements that apparently do > nothing. In both, an example is: > > x > > on a line by itself. This expression is evaluated, but then any result > discarded. If there was a genuine use

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread BartC
On 26/03/2016 13:22, Chris Angelico wrote: On Sat, Mar 26, 2016 at 11:21 PM, Steven D'Aprano wrote: In plain English, if the programmer had an intention for the code, and it was valid C syntax, it's not hard to conclude that the code has some meaning. Even if that meaning

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread cl
Thomas 'PointedEars' Lahn wrote: > c...@isbd.net wrote: > > > Occasionally I have to make forays into Javascript, can anyone > > recommend a place similar to this list where Javascript questions can > > be asked? The trouble is that there are very many usenet Javascript > >

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread cl
Ned Batchelder wrote: > On Friday, March 25, 2016 at 5:17:21 PM UTC-4, Thomas 'PointedEars' Lahn > wrote: > > c...@isbd.net wrote: > > > > > Occasionally I have to make forays into Javascript, can anyone > > > recommend a place similar to this list where Javascript

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Chris Angelico
On Sat, Mar 26, 2016 at 11:21 PM, Steven D'Aprano wrote: > In plain English, if the programmer had an intention for the code, and it > was valid C syntax, it's not hard to conclude that the code has some > meaning. Even if that meaning isn't quite what the programmer

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 01:59 pm, Paul Rubin wrote: > Steven D'Aprano writes: >> Culturally, C compiler writers have a preference for using undefined >> behaviour to allow optimizations, even if it means changing the semantics >> of your code. > > If your code has UB then by

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread SilentGhost
Changes by SilentGhost : -- nosy: +bethard versions: +Python 3.6 -Python 3.5 ___ Python tracker ___

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Chris Angelico
On Fri, Mar 25, 2016 at 11:06 PM, Aleksander Alekseev wrote: > Recently I spend half an hour looking for a bug in code like this: > > eax@fujitsu:~/temp$ cat ./t.py > #!/usr/bin/env python3 > > for x in range(0,5): > if x % 2 == 0: > next > print(str(x)) > >

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Steven D'Aprano
On Fri, 25 Mar 2016 11:06 pm, Aleksander Alekseev wrote: > Is it possible to make python complain in this case? Or maybe solve > such an issue somehow else? This is a job for a "linter", such as pychecker, pylint or pyflakes. Google for more if you are interested. A linter will check your code

[issue26645] argparse prints help messages to stdout instead of stderr by default

2016-03-26 Thread Alexey Muranov
New submission from Alexey Muranov: I believe that printing help and usage messages to stdout is a design error. In stdout i expect to find the output of my program, not help or diagnostic messages. It is strange to see nothing printed on the screen (where stderr usually goes), and then to

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Chris Angelico
On Sat, Mar 26, 2016 at 9:39 PM, Steven D'Aprano wrote: > It is an accident of history that Python's first and major implementation > happens to be written in C. (Although its use as a glue language, allowing > people to safely use libraries written in C, probably played a

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Ned Batchelder
On Saturday, March 26, 2016 at 5:59:30 AM UTC-4, Juan Dent wrote: > I am trying to run 'python cppdep.py' but get the following: > > > analyzing dependencies among all components ... > Traceback (most recent call

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 04:31 pm, Juan Dent wrote: > > I am trying to run ‘python cppdep.py’ but get the following: > > > analyzing dependencies among all components ... > Traceback (most recent call last): > File

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Larry Martell
On Sat, Mar 26, 2016 at 7:37 AM, Ned Batchelder wrote: > Thomas, you don't have to choose between correct and nice. It's > possible to be both. "I'm not good, I'm not nice, I'm just right." That was written by Stephen Sondheim and it's from his musical Into The Woods.

Re: I need help

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 05:52 am, matthew thiel wrote: > So I downloaded python and made an account but when I run it all it does > is give me 3 options repair modify and uninstall I have clicked repair and > modify and let them run but at the end it just exit out so how do I get it > to work??? You

Re: Suggestion: make sequence and map interfaces more similar

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 11:18 am, Marco Sulla wrote: >> That's a very superficial similarity: a list ['a', 'b', 'x', 'y'] is >> something like a mapping {0: 'a', 1: 'b', 2: 'x', 3: 'y'}. Seems logical, >> since in both cases we write collection[2] and get 'x' back. Marco, it is considered polite to

Re: [OT'ish] Is there a list as good as this for Javascript

2016-03-26 Thread Ned Batchelder
On Friday, March 25, 2016 at 11:37:34 PM UTC-4, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > > > On Sat, Mar 26, 2016 at 12:36 PM, Thomas 'PointedEars' Lahn > > wrote: > >>> Thomas is not typical of the Python community. We are mostly nice > >>> people. > >>> :)

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Mark Lawrence
On 25/03/2016 12:06, Aleksander Alekseev wrote: Hello Recently I spend half an hour looking for a bug in code like this: eax@fujitsu:~/temp$ cat ./t.py #!/usr/bin/env python3 for x in range(0,5): if x % 2 == 0: next print(str(x)) eax@fujitsu:~/temp$ ./t.py 0 1 2 3 4 Is it

Urgent Question Please

2016-03-26 Thread sanaaabdullah21
Hi Python developers, I am trying to click on the testInstance button using pywinauto but I couldn't do it, even it returns empty list when I try to print the controllers . Here is what I tried: app = application.Application() app=app.Connect(path =

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Chris Warrick
On 25 March 2016 at 13:06, Aleksander Alekseev wrote: > Hello > > Recently I spend half an hour looking for a bug in code like this: > > eax@fujitsu:~/temp$ cat ./t.py > #!/usr/bin/env python3 > > for x in range(0,5): > if x % 2 == 0: > next > print(str(x)) > >

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

2016-03-26 Thread Mark Lawrence
On 26/03/2016 05:31, Juan Dent wrote: I am trying to run ‘python cppdep.py’ but get the following: analyzing dependencies among all components ... Traceback (most recent call last): File "cppdep.py", line 675,

Re: Undefined behaviour in C [was Re: The Cost of Dynamism]

2016-03-26 Thread Steven D'Aprano
On Sat, 26 Mar 2016 04:30 pm, Rustom Mody wrote: > For one thing its good to remember that we wouldn't be here without python > Python wouldn't be what it is without CPython There is nothing about Python that relies on the C standard being as it is. There are Python implementations that are not

Re: Suggestion: make sequence and map interfaces more similar

2016-03-26 Thread Mark Lawrence
On 26/03/2016 00:35, Marco Sulla wrote: I'd like to see vdict implemented anyway. It can't break old code and add a map type that has a common interface with sequences. I cannot see this happening unless you provide a patch on the bug tracker. However I suspect you can get the same thing

  1   2   >